[Stgt-devel] Not updating Serial Number in SCSI Inquiry page correctly.

FUJITA Tomonori fujita.tomonori
Sat Mar 17 06:06:20 CET 2007


From: "Mark Harvey" <mark_harvey at symantec.com>
Subject: [Stgt-devel] Not updating Serial Number in SCSI Inquiry page	correctly.
Date: Fri, 16 Mar 2007 17:29:44 -0700

> In page 0x80 of SCSI Inquiry, forgot to decrement the destination
> pointer.

Thanks.

> ===================================================================
> --- spc.c       (revision 835)
> +++ spc.c       (working copy)
> @@ -108,7 +108,7 @@
>                                 p = data + 4 + tmp - 1;
>                                 q = cmd->dev->scsi_sn + SCSI_SN_LEN - 1;
>  
> -                               for (; tmp > 0; tmp--, q)
> +                               for (; tmp > 0; tmp--, q--)
>                                         *(p--) = *q;

I fixed this in the following way (a bit consistent with p):

-					*(p--) = *q;
+					*(p--) = *(q--);



More information about the stgt mailing list