chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resolve-host: use correct format specifier
[elogind.git]
/
src
/
libudev
/
libudev-monitor.c
diff --git
a/src/libudev/libudev-monitor.c
b/src/libudev/libudev-monitor.c
index 0a2ab82a89b28807aa41320b45880fc176dcf269..186e5e1e87360e46ce458331138fa9686c7a5db7 100644
(file)
--- a/
src/libudev/libudev-monitor.c
+++ b/
src/libudev/libudev-monitor.c
@@
-108,16
+108,22
@@
static struct udev_monitor *udev_monitor_new(struct udev *udev)
/* we consider udev running when /dev is on devtmpfs */
static bool udev_has_devtmpfs(struct udev *udev) {
/* we consider udev running when /dev is on devtmpfs */
static bool udev_has_devtmpfs(struct udev *udev) {
- union file_handle_union h = { .handle.handle_bytes = MAX_HANDLE_SZ, };
- int mount_id;
+
+ union file_handle_union h = {
+ .handle.handle_bytes = MAX_HANDLE_SZ
+ };
+
_cleanup_fclose_ FILE *f = NULL;
char line[LINE_MAX], *e;
_cleanup_fclose_ FILE *f = NULL;
char line[LINE_MAX], *e;
+ int mount_id;
int r;
r = name_to_handle_at(AT_FDCWD, "/dev", &h.handle, &mount_id, 0);
int r;
r = name_to_handle_at(AT_FDCWD, "/dev", &h.handle, &mount_id, 0);
- if (r < 0)
+ if (r < 0) {
+ if (errno != EOPNOTSUPP)
+ udev_err(udev, "name_to_handle_at on /dev: %m\n");
return false;
return false;
-
+ }
f = fopen("/proc/self/mountinfo", "re");
if (!f)
f = fopen("/proc/self/mountinfo", "re");
if (!f)