summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-monitor.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-04-24 07:46:31 +0200
committerLennart Poettering <lennart@poettering.net>2014-04-24 08:12:20 +0200
commit21749924e12201d8f5210c5dc9695e18fd16bb93 (patch)
tree5fb5dded3b6420408cce7530a5141e1322d8c147 /src/libudev/libudev-monitor.c
parent3a67e927e3be7efb8edf314a31aa4f8f5cba4f53 (diff)
util: make sure all our name_to_handle_at() code makes use of file_handle_union
Diffstat (limited to 'src/libudev/libudev-monitor.c')
-rw-r--r--src/libudev/libudev-monitor.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index 0a2ab82a89..c05cb3e511 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -108,17 +108,20 @@ 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) {
- 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;
+ int mount_id;
int r;
r = name_to_handle_at(AT_FDCWD, "/dev", &h.handle, &mount_id, 0);
if (r < 0)
return false;
-
f = fopen("/proc/self/mountinfo", "re");
if (!f)
return false;