diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2009-03-11 03:09:20 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2009-03-11 03:09:20 +0000 |
commit | e1a71a7d78f54c3f7c058f6760c0cac0107b66e4 (patch) | |
tree | 407c8642ff4e4b3ed046b67b774a84814890f9d4 /src/sg_format.c | |
parent | 2e51ec1248838d8ce3463fc0e028f2804ce56a84 (diff) | |
download | sg3_utils-e1a71a7d78f54c3f7c058f6760c0cac0107b66e4.tar.gz |
sg_write_same: first cut and manpage
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@231 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_format.c')
-rw-r--r-- | src/sg_format.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sg_format.c b/src/sg_format.c index 0fefd3af..c5f490d6 100644 --- a/src/sg_format.c +++ b/src/sg_format.c @@ -45,7 +45,7 @@ #include "sg_cmds_basic.h" #include "sg_cmds_extra.h" -static char * version_str = "1.16 20090228"; +static char * version_str = "1.17 20090310"; #define RW_ERROR_RECOVERY_PAGE 1 /* every disk should have one */ #define FORMAT_DEV_PAGE 3 /* Format Device Mode Page [now obsolete] */ @@ -274,9 +274,12 @@ print_read_cap(int fd, int do_16, int verbose) (resp_buff[10] << 8) | resp_buff[11]); printf("Read Capacity (16) results:\n"); - printf(" Protection: prot_en=%d, rto_en=%d\n", + printf(" Protection: prot_en=%d, p_type=%d\n", !!(resp_buff[12] & 0x1), - !!(resp_buff[12] & 0x2)); + ((resp_buff[12] >> 1) & 0x7)); + printf(" Thin provisioning: tpe=%d, tprz=%d\n", + !!(resp_buff[14] & 0x80), + !!(resp_buff[14] & 0x40)); printf(" Number of blocks=%" PRIu64 "\n", llast_blk_addr + 1); printf(" Block size=%u bytes\n", block_size); |