hreinecke / sg3_utils

Deprecated git-svn mirror for sg3_utils
http://sg.danny.cz/sg/sg3_utils.html
Other
154 stars 91 forks source link

mmap IO example mistake #103

Open GrigorenkoPV opened 4 months ago

GrigorenkoPV commented 4 months ago
diff --git a/examples/sg_simple4.c b/examples/sg_simple4.c
index 95a5023b..6f3799ad 100644
--- a/examples/sg_simple4.c
+++ b/examples/sg_simple4.c
@@ -118,7 +118,7 @@ int main(int argc, char * argv[])
     io_hdr.mx_sb_len = sizeof(sense_buffer);
     io_hdr.dxfer_direction = SG_DXFER_FROM_DEV;
     io_hdr.dxfer_len = INQ_REPLY_LEN;
-    /* io_hdr.dxferp = inqBuff; // ignored in mmap-ed IO */
+    io_hdr.dxferp = inqBuff;
     io_hdr.cmdp = inq_cdb;
     io_hdr.sbp = sense_buffer;
     io_hdr.timeout = 20000;     /* 20000 millisecs == 20 seconds */