[Pcsclite-cvs-commit] r2234 - trunk/Drivers/ccid/src
Ludovic Rousseau
rousseau at alioth.debian.org
Wed Nov 22 20:40:16 CET 2006
Author: rousseau
Date: 2006-11-22 20:40:15 +0100 (Wed, 22 Nov 2006)
New Revision: 2234
Modified:
trunk/Drivers/ccid/src/parse.c
Log:
exit if the command is not run as root and getting iManufacturer fails
Modified: trunk/Drivers/ccid/src/parse.c
===================================================================
--- trunk/Drivers/ccid/src/parse.c 2006-11-21 22:32:52 UTC (rev 2233)
+++ trunk/Drivers/ccid/src/parse.c 2006-11-22 19:40:15 UTC (rev 2234)
@@ -134,7 +134,14 @@
printf(" idVendor: 0x%04X\n", dev->descriptor.idVendor);
if (usb_get_string_simple(handle, dev->descriptor.iManufacturer,
buffer, sizeof(buffer)) < 0)
+ {
printf(" Can't get iManufacturer string\n");
+ if (getuid())
+ {
+ printf("\33[01;31mPlease, restart the command as root\33[0m\n\n");
+ return TRUE;
+ }
+ }
else
printf(" iManufacturer: %s\n", buffer);
More information about the Pcsclite-cvs-commit
mailing list