diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2012-12-06 10:00:15 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2012-12-06 10:00:15 +0000 |
commit | a455114c44be5eb5ef423bb2e39da233589cd0dd (patch) | |
tree | d38d551da90067b9cebafcba1a46ca0606ec6fe7 /lib/sg_cmds_extra.c | |
parent | 8243af5bed308cfc43c7f4ea613ebbbf2a240d6f (diff) | |
download | sg3_utils-a455114c44be5eb5ef423bb2e39da233589cd0dd.tar.gz |
sg_verify: BYTCHK expansion in sbc3r34; block device characteristics VPD page additions
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@468 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_cmds_extra.c')
-rw-r--r-- | lib/sg_cmds_extra.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sg_cmds_extra.c b/lib/sg_cmds_extra.c index 791da154..48534b28 100644 --- a/lib/sg_cmds_extra.c +++ b/lib/sg_cmds_extra.c @@ -1575,8 +1575,9 @@ sg_ll_verify10(int sg_fd, int vrprotect, int dpo, int bytchk, unsigned char sense_b[SENSE_BUFF_LEN]; struct sg_pt_base * ptvp; + /* N.B. BYTCHK field expanded to 2 bits sbc3r34 */ vCmdBlk[1] = ((vrprotect & 0x7) << 5) | ((dpo & 0x1) << 4) | - ((bytchk & 0x1) << 1) ; + ((bytchk & 0x3) << 1) ; vCmdBlk[2] = (unsigned char)((lba >> 24) & 0xff); vCmdBlk[3] = (unsigned char)((lba >> 16) & 0xff); vCmdBlk[4] = (unsigned char)((lba >> 8) & 0xff); @@ -1670,8 +1671,9 @@ sg_ll_verify16(int sg_fd, int vrprotect, int dpo, int bytchk, uint64_t llba, unsigned char sense_b[SENSE_BUFF_LEN]; struct sg_pt_base * ptvp; + /* N.B. BYTCHK field expanded to 2 bits sbc3r34 */ vCmdBlk[1] = ((vrprotect & 0x7) << 5) | ((dpo & 0x1) << 4) | - ((bytchk & 0x1) << 1) ; + ((bytchk & 0x3) << 1) ; vCmdBlk[2] = (llba >> 56) & 0xff; vCmdBlk[3] = (llba >> 48) & 0xff; vCmdBlk[4] = (llba >> 40) & 0xff; |