[dm-devel] [PATCH] readsector0: the length of the buffer wrong

zhang.kai16 at zte.com.cn zhang.kai16 at zte.com.cn
Tue Jul 5 11:48:53 UTC 2016


hi,

The length of the buffer is 4096, not 4069 in sg_read().
 
---
 libmultipath/checkers/readsector0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/checkers/readsector0.c 
b/libmultipath/checkers/readsector0.c
index 0550fb6..1c2a868 100644
--- a/libmultipath/checkers/readsector0.c
+++ b/libmultipath/checkers/readsector0.c
@@ -29,7 +29,7 @@ int libcheck_check (struct checker * c)
                 unsigned char sbuf[SENSE_BUFF_LEN];
                 int ret;
 
-                ret = sg_read(c->fd, &buf[0], 4069, &sbuf[0],
+                ret = sg_read(c->fd, &buf[0], 4096, &sbuf[0],
                                       SENSE_BUFF_LEN, c->timeout);
 
                 switch (ret)
-- 
1.9.1

--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s).  If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited.  If you have received this mail in error, please delete it and notify us immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160705/998349dd/attachment.htm>


More information about the dm-devel mailing list