summaryrefslogtreecommitdiff
path: root/udev/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-10-01 19:00:55 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-10-01 19:00:55 +0200
commitf13e4c36c2246eba5afae482c9bb60dc8c0b719d (patch)
tree11736c05d6790a63ca1e1f0d3f5a63ca926c81c5 /udev/udevd.c
parent4dea370d493c6d94799e63128398ae8374b999b4 (diff)
udevd: print warning if CONFIG_SYSFS_DEPRECATED is used
Future udev versions will depend on the current sysfs layout, which includes features which are not available in the deprecated mode.
Diffstat (limited to 'udev/udevd.c')
-rw-r--r--udev/udevd.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/udev/udevd.c b/udev/udevd.c
index 1f8483c301..9783fe4e7c 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -953,9 +953,21 @@ int main(int argc, char *argv[])
fd = open("/dev/kmsg", O_WRONLY);
if (fd > 0) {
- const char *str = "<6>udevd version " VERSION " started\n";
-
- write(fd, str, strlen(str));
+ const char *ver_str = "<6>udev: starting version " VERSION "\n";
+ char path[UTIL_PATH_SIZE];
+ struct stat statbuf;
+
+ write(fd, ver_str, strlen(ver_str));
+ util_strlcpy(path, udev_get_sys_path(udev), sizeof(path));
+ 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 "
+ "(CONFIG_SYSFS_DEPRECATED) is unsupported\n";
+
+ write(fd, depr_str, strlen(depr_str));
+ }
+ }
close(fd);
}