From: zhang.kai16@zte.com.cn
To: christophe varoqui <christophe.varoqui@free.fr>,
Hannes Reinecke <hare@suse.de>
Cc: dm-devel@redhat.com, tang.junhui@zte.com.cn
Subject: [PATCH] readsector0: the length of the buffer wrong
Date: Tue, 5 Jul 2016 19:48:53 +0800 [thread overview]
Message-ID: <OF3CB78F61.50E78D53-ON48257FE7.003E97A1-48257FE7.0040E0D4@zte.com.cn> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1250 bytes --]
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.
[-- Attachment #1.2: Type: text/html, Size: 1901 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next reply other threads:[~2016-07-05 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 11:48 zhang.kai16 [this message]
2016-07-08 7:34 ` [PATCH] readsector0: the length of the buffer wrong Christophe Varoqui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF3CB78F61.50E78D53-ON48257FE7.003E97A1-48257FE7.0040E0D4@zte.com.cn \
--to=zhang.kai16@zte.com.cn \
--cc=christophe.varoqui@free.fr \
--cc=dm-devel@redhat.com \
--cc=hare@suse.de \
--cc=tang.junhui@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.