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

Christophe Varoqui christophe.varoqui at opensvc.com
Fri Jul 8 07:34:02 UTC 2016


Merged.
Thanks.

On Tue, Jul 5, 2016 at 1:48 PM, <zhang.kai16 at zte.com.cn> wrote:

> 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.
>
>
>
>
> --
> dm-devel mailing list
> dm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160708/443754e1/attachment.htm>


More information about the dm-devel mailing list