]> err.no Git - systemd/commitdiff
remove remaining support for CONFIG_SYSFS_DEPRECATED
authorKay Sievers <kay.sievers@vrfy.org>
Tue, 15 Dec 2009 15:14:14 +0000 (16:14 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 15 Dec 2009 15:14:14 +0000 (16:14 +0100)
Makefile.am
NEWS
TODO
libudev/libudev-device.c
libudev/libudev-enumerate.c
udev/udevd.c

index 62fe5a0f0761162ccb7923d78d8fd89aa1bc3d79..993d70075db1c88554a294bb8da771315e83fc03 100644 (file)
@@ -29,7 +29,7 @@ CLEANFILES =
 # libudev
 # ------------------------------------------------------------------------------
 LIBUDEV_CURRENT=5
-LIBUDEV_REVISION=1
+LIBUDEV_REVISION=2
 LIBUDEV_AGE=5
 
 SUBDIRS += libudev/docs
diff --git a/NEWS b/NEWS
index 1b7377efb8dfc2f67206914d806c99ddf625cf4c..9977eaa6d25ab4c28d17146f042f95a58d21f8be 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ udev 150
 ========
 Bugfixes.
 
+Kernels with SYSFS_DEPRECATED=y are not supported since a while. Many users
+depend on the current sysfs layout and the information not available in the
+deprecated layout. All remaining support for the deprecated sysfs layout is
+removed now.
+
 udev 149
 ========
 Fix for a possible endless loop in the new input_id program.
diff --git a/TODO b/TODO
index bc94f1b0eeda14102bd1d5bf70a03cab12664b3b..1fc80e1a4a67dd168efe2226bc18d042f509cf32 100644 (file)
--- a/TODO
+++ b/TODO
@@ -3,5 +3,4 @@
   o get rid of "scan all devices to find myself" libusb interface
       if it can not be fixed, drop libusb entirely and add a simple
       wrapper around the Linux usb ioctls we need
-  o drop all support for the DEPRECATED sysfs layout
   o remove deprecated BUS=, SYSFS{}=, ID= keys
index add1c99ec03bcb89ded7c05c6a8c782d572874b0..dffeed0b79bc95f5fbfa190cbd46205264cc2139 100644 (file)
@@ -508,20 +508,9 @@ static struct udev_device *device_new_from_parent(struct udev_device *udev_devic
        char path[UTIL_PATH_SIZE];
        const char *subdir;
 
-       /* follow "device" link in deprecated sys layout */
-       if (strncmp(udev_device->devpath, "/class/", 7) == 0 ||
-           strncmp(udev_device->devpath, "/block/", 7) == 0) {
-               util_strscpyl(path, sizeof(path), udev_device->syspath, "/device", NULL);
-               if (util_resolve_sys_link(udev_device->udev, path, sizeof(path)) == 0) {
-                       udev_device_parent = udev_device_new_from_syspath(udev_device->udev, path);
-                       if (udev_device_parent != NULL)
-                               return udev_device_parent;
-               }
-       }
-
        util_strscpy(path, sizeof(path), udev_device->syspath);
        subdir = &path[strlen(udev_get_sys_path(udev_device->udev))+1];
-       while (1) {
+       for (;;) {
                char *pos;
 
                pos = strrchr(subdir, '/');
index 186abb927e3dd189373269eaed4d36215a5cc397..2fcd34829644f9c5defab0cc1b48ce55daf3c498 100644 (file)
@@ -685,18 +685,6 @@ int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate)
                scan_dir(udev_enumerate, "bus", "devices", NULL);
                dbg(udev, "searching '/class/*' dir\n");
                scan_dir(udev_enumerate, "class", NULL, NULL);
-               /* if block isn't a class, scan /block/ */
-               util_strscpyl(base, sizeof(base), udev_get_sys_path(udev), "/class/block", NULL);
-               if (stat(base, &statbuf) != 0) {
-                       if (match_subsystem(udev_enumerate, "block")) {
-                               dbg(udev, "searching '/block/*' dir\n");
-                               /* scan disks */
-                               scan_dir_and_add_devices(udev_enumerate, "block", NULL, NULL);
-                               /* scan partitions */
-                               dbg(udev, "searching '/block/*/*' dir\n");
-                               scan_dir(udev_enumerate, "block", NULL, "block");
-                       }
-               }
        }
        return 0;
 }
index 300d6035191a8e55e7c09d2d85e6d0272f53c147..99647c683cf90c933052e546cc34217093cce929 100644 (file)
@@ -764,37 +764,11 @@ static void handle_signal(struct udev *udev, int signo)
        }
 }
 
-static void startup_log(struct udev *udev)
-{
-       FILE *f;
-       char path[UTIL_PATH_SIZE];
-       struct stat statbuf;
-
-       f = fopen("/dev/kmsg", "w");
-       if (f != NULL)
-               fprintf(f, "<6>udev: starting version " VERSION "\n");
-
-       util_strscpyl(path, sizeof(path), udev_get_sys_path(udev), "/class/mem/null", NULL);
-       if (lstat(path, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) {
-               const char *depr_str =
-                       "udev: missing sysfs features; please update the kernel "
-                       "or disable the kernel's CONFIG_SYSFS_DEPRECATED option; "
-                       "udev may fail to work correctly";
-
-               if (f != NULL)
-                       fprintf(f, "<3>%s\n", depr_str);
-               err(udev, "%s\n", depr_str);
-               sleep(15);
-       }
-
-       if (f != NULL)
-               fclose(f);
-}
-
 int main(int argc, char *argv[])
 {
        struct udev *udev;
        int fd;
+       FILE *f;
        sigset_t mask;
        const char *value;
        int daemonize = false;
@@ -988,7 +962,11 @@ int main(int argc, char *argv[])
                }
        }
 
-       startup_log(udev);
+       f = fopen("/dev/kmsg", "w");
+       if (f != NULL) {
+               fprintf(f, "<6>udev: starting version " VERSION "\n");
+               fclose(f);
+       }
 
        /* redirect std{out,err} */
        if (!debug && !debug_trace) {