chiark / gitweb /
udevd: print warning if CONFIG_SYSFS_DEPRECATED is used
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 1 Oct 2008 17:00:55 +0000 (19:00 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 1 Oct 2008 17:00:55 +0000 (19:00 +0200)
Future udev versions will depend on the current sysfs layout, which
includes features which are not available in the deprecated mode.

TODO
udev/udevd.c

diff --git a/TODO b/TODO
index b3254155cb8158cec3d7c98d2888d5f42a1b285e..f960f2431b33480b7ce3753e4809a587bd114558 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,10 +1,9 @@
+  o handle spaces in SYMLINK+=, do not create multiple links
   o use libudev device in udev_rules.c
       get rid of udevice, store rule matching state in rule iterator
   o rework rules to a match-action list, instead of a rules array
   o add DVB variables to kernel, and drop shell script rule
   o add watershed extra
   o use libudev device in udev_rules.c
       get rid of udevice, store rule matching state in rule iterator
   o rework rules to a match-action list, instead of a rules array
   o add DVB variables to kernel, and drop shell script rule
   o add watershed extra
-  o log warning if /sys/block/ does, but /sys/class/block/ does not exist,
-    udev will depend on the non-deprecated sysfs layout in a future release
   o DEVTYPE for disks is set by the kernel, they will be removed from
     the default rules
   o "udevadm control" commands will only accept the --<command> syntax
   o DEVTYPE for disks is set by the kernel, they will be removed from
     the default rules
   o "udevadm control" commands will only accept the --<command> syntax
index 1f8483c301dde3c91e7e775ffede2332c903ca6d..9783fe4e7c545db6bc37e450c06050ea57747870 100644 (file)
@@ -953,9 +953,21 @@ int main(int argc, char *argv[])
 
        fd = open("/dev/kmsg", O_WRONLY);
        if (fd > 0) {
 
        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);
        }
 
                close(fd);
        }