chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
require non-SYSFS_DEPRECATED 2.6.20+ kernel
[elogind.git]
/
udev
/
udevd.c
diff --git
a/udev/udevd.c
b/udev/udevd.c
index 15a197e561e1674d91b478b072763f2baff9f374..993964d23d39f2fb1485dc8c8725af7e4202df86 100644
(file)
--- a/
udev/udevd.c
+++ b/
udev/udevd.c
@@
-823,9
+823,10
@@
int main(int argc, char *argv[])
util_strlcat(path, "/class/mem/null", sizeof(path));
if (lstat(path, &statbuf) == 0) {
if (S_ISDIR(statbuf.st_mode)) {
util_strlcat(path, "/class/mem/null", sizeof(path));
if (lstat(path, &statbuf) == 0) {
if (S_ISDIR(statbuf.st_mode)) {
- const char *depr_str = "<6>udev: deprecated sysfs layout (kernel too old, "
- "or CONFIG_SYSFS_DEPRECATED) is unsupported, some "
- "udev features may fail\n";
+ const char *depr_str =
+ "<6>udev: deprecated sysfs layout; update the kernel or "
+ "disable CONFIG_SYSFS_DEPRECATED; some udev features will "
+ "not work correctly\n";
write(fd, depr_str, strlen(depr_str));
}
write(fd, depr_str, strlen(depr_str));
}
@@
-864,7
+865,7
@@
int main(int argc, char *argv[])
IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
}
} else if (errno == ENOSYS)
IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
}
} else if (errno == ENOSYS)
-
err(udev, "the kernel does not support inotify, udevd can't monitor rules file
changes\n");
+
info(udev, "unable to use inotify, udevd will not monitor rule files
changes\n");
else
err(udev, "inotify_init failed: %m\n");
else
err(udev, "inotify_init failed: %m\n");
@@
-974,21
+975,18
@@
int main(int argc, char *argv[])
event_queue_manager(udev);
}
}
event_queue_manager(udev);
}
}
+ cleanup_queue_dir(udev);
rc = 0;
rc = 0;
-
exit:
udev_rules_unref(rules);
exit:
udev_rules_unref(rules);
-
if (signal_pipe[READ_END] >= 0)
close(signal_pipe[READ_END]);
if (signal_pipe[WRITE_END] >= 0)
close(signal_pipe[WRITE_END]);
if (signal_pipe[READ_END] >= 0)
close(signal_pipe[READ_END]);
if (signal_pipe[WRITE_END] >= 0)
close(signal_pipe[WRITE_END]);
-
udev_ctrl_unref(udev_ctrl);
if (inotify_fd >= 0)
close(inotify_fd);
udev_monitor_unref(kernel_monitor);
udev_ctrl_unref(udev_ctrl);
if (inotify_fd >= 0)
close(inotify_fd);
udev_monitor_unref(kernel_monitor);
- cleanup_queue_dir(udev);
udev_selinux_exit(udev);
udev_unref(udev);
logging_close();
udev_selinux_exit(udev);
udev_unref(udev);
logging_close();