Re: [PATCH 1/3] usb: gadget: iSerialNumber for FunctionFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Jan 2012 12:31:37 +0100, Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx> wrote:
@@ -251,6 +259,9 @@ static int gfs_bind(struct usb_composite_dev *cdev)
 	snprintf(gfs_manufacturer, sizeof gfs_manufacturer, "%s %s with %s",
 		 init_utsname()->sysname, init_utsname()->release,
 		 cdev->gadget->name);
+	if (gfs_serial_p)
+		strncpy(gfs_serial, gfs_serial_p, STRING_LEN);
+	gfs_serial[STRING_LEN - 1] = '\0';

On Wed, 18 Jan 2012 13:40:16 +0100, Michal Nazarewicz <mina86@xxxxxxxxxx> wrote:
My taste would be to use sizeof(gfs_serial) rather then macro (it would also
match the rest of the code).

Sorry, this should of course read ARRAY_SIZE(gfs_serial), not sizeof(gfs_serial).

--
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@xxxxxxxxxx>--------------ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux