summaryrefslogtreecommitdiff
path: root/wait_for_sysfs.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-10-18 22:57:41 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 22:06:44 -0700
commitff694eca172deb298e806246f6e88bc66235534a (patch)
tree475aa7aee75d2c5d01cb4b8da7e6d471b459b496 /wait_for_sysfs.c
parent3b2382de5192057d4c3ac25ddce9c70348d756f9 (diff)
[PATCH] fix debug in volume id / fix clashing global var name
Here we get the logging for udev_volume_id working if it is compiled with DEBUG=true. Also fixed is a name clash with a global variable.
Diffstat (limited to 'wait_for_sysfs.c')
-rw-r--r--wait_for_sysfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/wait_for_sysfs.c b/wait_for_sysfs.c
index b6de3947c8..45f84606b1 100644
--- a/wait_for_sysfs.c
+++ b/wait_for_sysfs.c
@@ -387,7 +387,7 @@ int main(int argc, char *argv[], char *envp[])
const char *devpath = "";
const char *action;
const char *subsystem;
- char sysfs_path[SYSFS_PATH_MAX];
+ char sysfs_mnt_path[SYSFS_PATH_MAX];
char filename[SYSFS_PATH_MAX];
struct sysfs_class_device *class_dev;
struct sysfs_device *devices_dev;
@@ -422,14 +422,14 @@ int main(int argc, char *argv[], char *envp[])
goto exit;
}
- if (sysfs_get_mnt_path(sysfs_path, SYSFS_PATH_MAX) != 0) {
+ if (sysfs_get_mnt_path(sysfs_mnt_path, SYSFS_PATH_MAX) != 0) {
dbg("error: no sysfs path");
rc = 2;
goto exit;
}
if ((strncmp(devpath, "/block/", 7) == 0) || (strncmp(devpath, "/class/", 7) == 0)) {
- snprintf(filename, SYSFS_PATH_MAX-1, "%s%s", sysfs_path, devpath);
+ snprintf(filename, SYSFS_PATH_MAX-1, "%s%s", sysfs_mnt_path, devpath);
filename[SYSFS_PATH_MAX-1] = '\0';
/* open the class device we are called for */
@@ -446,7 +446,7 @@ int main(int argc, char *argv[], char *envp[])
sysfs_close_class_device(class_dev);
} else if ((strncmp(devpath, "/devices/", 9) == 0)) {
- snprintf(filename, SYSFS_PATH_MAX-1, "%s%s", sysfs_path, devpath);
+ snprintf(filename, SYSFS_PATH_MAX-1, "%s%s", sysfs_mnt_path, devpath);
filename[SYSFS_PATH_MAX-1] = '\0';
/* open the path we are called for */