[Pcsclite-cvs-commit] PCSC/src pcsclite.h,1.20,1.21 hotplug_libusb.c,1.11,1.12
rousseau@quantz.debian.org
rousseau@quantz.debian.org
Tue, 16 Sep 2003 15:49:23 +0200
Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv26367/src
Modified Files:
pcsclite.h hotplug_libusb.c
Log Message:
remove / at the end of usbdropdir, muscledropdir and ipcdir to be more
homogeneous
Index: pcsclite.h
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/pcsclite.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- pcsclite.h 7 Sep 2003 18:06:58 -0000 1.20
+++ pcsclite.h 16 Sep 2003 13:49:20 -0000 1.21
@@ -164,7 +164,7 @@
#endif
#define PCSCLITE_READER_CONFIG PCSCLITE_CONFIG_DIR "/reader.conf"
#ifndef USE_IPCDIR
-#define PCSCLITE_IPC_DIR "/var/run/"
+#define PCSCLITE_IPC_DIR "/var/run"
#else
#define PCSCLITE_IPC_DIR USE_IPCDIR
#endif
Index: hotplug_libusb.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_libusb.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- hotplug_libusb.c 8 Sep 2003 11:23:57 -0000 1.11
+++ hotplug_libusb.c 16 Sep 2003 13:49:20 -0000 1.12
@@ -119,9 +119,9 @@
* The bundle exists - let's form a full path name and get the
* vendor and product ID's for this particular bundle
*/
- snprintf(fullPath, FILENAME_MAX, "%s%s%s", PCSCLITE_HP_DROPDIR,
- currFP->d_name, "/Contents/Info.plist");
- fullPath[FILENAME_MAX - 1] = '\0';
+ snprintf(fullPath, sizeof(fullPath), "%s/%s/Contents/Info.plist",
+ PCSCLITE_HP_DROPDIR, currFP->d_name);
+ fullPath[sizeof(fullPath) - 1] = '\0';
/* while we find a nth ifdVendorID in Info.plist */
while (LTPBundleFindValueWithKey(fullPath, PCSCLITE_MANUKEY_NAME,
@@ -153,9 +153,10 @@
keyValue, 0);
if (rv == 0)
{
- snprintf(fullLibPath, FILENAME_MAX, "%s%s%s%s", PCSCLITE_HP_DROPDIR,
- currFP->d_name, "/Contents/Linux/", keyValue);
- fullLibPath[FILENAME_MAX - 1] = '\0';
+ snprintf(fullLibPath, sizeof(fullLibPath),
+ "%s/%s/Contents/Linux/%s",
+ PCSCLITE_HP_DROPDIR, currFP->d_name, keyValue);
+ fullLibPath[sizeof(fullLibPath) - 1] = '\0';
driverTracker[listCount].libraryPath = strdup(fullLibPath);
}