chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Make dev.d/ handling a separate processing stage
[elogind.git]
/
wait_for_sysfs.c
diff --git
a/wait_for_sysfs.c
b/wait_for_sysfs.c
index 3b1b0cd24809a249700c284746cf7dbdf5714760..42b9d383dc9cc51467954964dc2028f35ea78c11 100644
(file)
--- 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)) {
}
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 */
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)) {
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 */
filename[SYSFS_PATH_MAX-1] = '\0';
/* open the path we are called for */