diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2015-12-02 03:08:31 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2015-12-02 03:08:31 +0000 |
commit | 7f926639212e5ce0069c65b8827455f7a265cf33 (patch) | |
tree | 0f11fecd318e0b7a76136892c0c23b01f8a141e8 /src/sg_dd.c | |
parent | 0c25917aa05ec4c51c6b29da5734e49ad6fe0f2a (diff) | |
download | sg3_utils-7f926639212e5ce0069c65b8827455f7a265cf33.tar.gz |
fix some unaligned gremlins
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@652 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_dd.c')
-rw-r--r-- | src/sg_dd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sg_dd.c b/src/sg_dd.c index 641e8e38..0bead3df 100644 --- a/src/sg_dd.c +++ b/src/sg_dd.c @@ -59,7 +59,7 @@ #include "sg_io_linux.h" #include "sg_unaligned.h" -static const char * version_str = "5.83 20150215"; +static const char * version_str = "5.84 20151201"; #define ME "sg_dd: " @@ -517,7 +517,7 @@ sg_build_scsi_cdb(unsigned char * cdbp, int cdb_sz, unsigned int blocks, sz_ind = 0; cdbp[0] = (unsigned char)(write_true ? wr_opcode[sz_ind] : rd_opcode[sz_ind]); - sg_put_unaligned_be24(start_block, cdbp + 1); + sg_put_unaligned_be24(0x1fffff & start_block, cdbp + 1); cdbp[4] = (256 == blocks) ? 0 : (unsigned char)blocks; if (blocks > 256) { fprintf(stderr, ME "for 6 byte commands, maximum number of " |