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] remove historical SYSFS_attr="value" format
[elogind.git]
/
wait_for_sysfs.c
diff --git
a/wait_for_sysfs.c
b/wait_for_sysfs.c
index 3b1b0cd24809a249700c284746cf7dbdf5714760..84a25adb976b10a82146513aa10734f85463bafb 100644
(file)
--- a/
wait_for_sysfs.c
+++ b/
wait_for_sysfs.c
@@
-32,10
+32,11
@@
#include <errno.h>
#include <sys/stat.h>
#include <errno.h>
#include <sys/stat.h>
-#include "logging.h"
+#include "libsysfs/sysfs/libsysfs.h"
+#include "udev_lib.h"
#include "udev_version.h"
#include "udev_sysfs.h"
#include "udev_version.h"
#include "udev_sysfs.h"
-#include "l
ibsysfs/sysfs/libsysfs
.h"
+#include "l
ogging
.h"
#ifdef LOG
unsigned char logname[LOGNAME_SIZE];
#ifdef LOG
unsigned char logname[LOGNAME_SIZE];
@@
-96,7
+97,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 */
@@
-106,7
+107,7
@@
int main(int argc, char *argv[], char *envp[])
}
/* open the class device we are called for */
}
/* open the class device we are called for */
- class_dev =
open_class_device_wait
(filename);
+ class_dev =
wait_class_device_open
(filename);
if (!class_dev) {
dbg("error: class device unavailable (probably remove has beaten us)");
goto exit;
if (!class_dev) {
dbg("error: class device unavailable (probably remove has beaten us)");
goto exit;
@@
-128,19
+129,19
@@
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 */
- devices_dev =
open_devices_device_wait
(filename);
+ devices_dev =
wait_devices_device_open
(filename);
if (!devices_dev) {
dbg("error: devices device unavailable (probably remove has beaten us)");
goto exit;
}
dbg("devices device opened '%s'", filename);
if (!devices_dev) {
dbg("error: devices device unavailable (probably remove has beaten us)");
goto exit;
}
dbg("devices device opened '%s'", filename);
- /* wait for the
bus valu
e */
- wait_for_
bu
s_device(devices_dev, &error);
+ /* wait for the
devices devic
e */
+ wait_for_
device
s_device(devices_dev, &error);
sysfs_close_device(devices_dev);
sysfs_close_device(devices_dev);