aboutsummaryrefslogtreecommitdiff
path: root/src/sg_write_x.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2020-04-04 02:45:35 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2020-04-04 02:45:35 +0000
commit7f78fcb9b12c87fdc6eca644bc1582d8e5e1242c (patch)
tree85f77e9b0489f0e984e917b2e0312d0ddcd7ef88 /src/sg_write_x.c
parent6d0bc453c737596c5b563dd27d69c2301e9fe280 (diff)
downloadsg3_utils-7f78fcb9b12c87fdc6eca644bc1582d8e5e1242c.tar.gz
sync with sbc4r19a; start req/write SNTL work; testing fixes
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@846 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_write_x.c')
-rw-r--r--src/sg_write_x.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sg_write_x.c b/src/sg_write_x.c
index 0bc28c27..925aa92f 100644
--- a/src/sg_write_x.c
+++ b/src/sg_write_x.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 Douglas Gilbert.
+ * Copyright (c) 2017-2020 Douglas Gilbert.
* All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file.
@@ -38,7 +38,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.22 20191220";
+static const char * version_str = "1.23 20200331";
/* Protection Information refers to 8 bytes of extra information usually
* associated with each logical block and is often abbreviated to PI while
@@ -1092,6 +1092,14 @@ do_write_x(int sg_fd, const void * dataoutp, int dout_len,
x_cdb[10] |= 0x10;
if (op->fua)
x_cdb[10] |= 0x8;
+ if (op->dld) { /* added in sbc4r19 */
+ if (op->dld & 1)
+ x_cdb[11] |= 0x1;
+ if (op->dld & 2)
+ x_cdb[11] |= 0x2;
+ if (op->dld & 4)
+ x_cdb[11] |= 0x4;
+ }
sg_put_unaligned_be32(op->ref_tag, x_cdb + 20);
sg_put_unaligned_be16(op->app_tag, x_cdb + 24);
sg_put_unaligned_be16(op->tag_mask, x_cdb + 26);