summaryrefslogtreecommitdiff
path: root/wait_for_sysfs.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-12 06:21:16 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:25:09 -0700
commit8673dcb84299fd2adba6281c5359bed4399d5b2d (patch)
tree9db3b5d4e7218b098c53d62b8805c9c9368a78af /wait_for_sysfs.c
parentaf4b05d4917fdfa55eff3d8d53a830464d8162a1 (diff)
[PATCH] Make dev.d/ handling a separate processing stage
Move the logic when and how to call the dev.d/ scripts into the main processing path.
Diffstat (limited to 'wait_for_sysfs.c')
-rw-r--r--wait_for_sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wait_for_sysfs.c b/wait_for_sysfs.c
index 3b1b0cd248..42b9d383dc 100644
--- a/wait_for_sysfs.c
+++ b/wait_for_sysfs.c
@@ -96,7 +96,7 @@ int main(int argc, char *argv[], char *envp[])
}
if ((strncmp(devpath, "/block/", 7) == 0) || (strncmp(devpath, "/class/", 7) == 0)) {
- snprintf(filename, SYSFS_PATH_MAX-1, "%s%s", sysfs_mnt_path, devpath);
+ snprintf(filename, SYSFS_PATH_MAX, "%s%s", sysfs_mnt_path, devpath);
filename[SYSFS_PATH_MAX-1] = '\0';
/* skip bad events where we get no device for the class */
@@ -128,7 +128,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_mnt_path, devpath);
+ snprintf(filename, SYSFS_PATH_MAX, "%s%s", sysfs_mnt_path, devpath);
filename[SYSFS_PATH_MAX-1] = '\0';
/* open the path we are called for */