chiark / gitweb /
remove all PHYSDEVPATH handling and warning about
authorKay Sievers <kay.sievers@vrfy.org>
Mon, 4 May 2009 20:08:05 +0000 (22:08 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 4 May 2009 20:08:05 +0000 (22:08 +0200)
udev/lib/libudev-device.c
udev/lib/libudev-monitor.c
udev/lib/libudev-private.h
udev/udev-rules.c
udev/udevd.c

index 8e29eff..ddc4b34 100644 (file)
@@ -36,7 +36,6 @@ struct udev_device {
        char *driver;
        char *action;
        char *devpath_old;
-       char *physdevpath;
        char *knodename;
        char **envp;
        char *monitor_buf;
@@ -625,7 +624,6 @@ void udev_device_unref(struct udev_device *udev_device)
        free(udev_device->driver);
        free(udev_device->devpath_old);
        free(udev_device->knodename);
-       free(udev_device->physdevpath);
        udev_list_cleanup_entries(udev_device->udev, &udev_device->sysattr_list);
        free(udev_device->envp);
        free(udev_device->monitor_buf);
@@ -1192,19 +1190,6 @@ int udev_device_set_knodename(struct udev_device *udev_device, const char *knode
        return 0;
 }
 
-const char *udev_device_get_physdevpath(struct udev_device *udev_device)
-{
-       return udev_device->physdevpath;
-}
-
-int udev_device_set_physdevpath(struct udev_device *udev_device, const char *physdevpath)
-{
-       udev_device->physdevpath = strdup(physdevpath);
-       if (udev_device->physdevpath == NULL)
-               return -ENOMEM;
-       return 0;
-}
-
 int udev_device_get_timeout(struct udev_device *udev_device)
 {
        return udev_device->timeout;
index fc904c4..2540e85 100644 (file)
@@ -586,15 +586,10 @@ retry:
                        min = strtoull(&key[6], NULL, 10);
                } else if (strncmp(key, "DEVPATH_OLD=", 12) == 0) {
                        udev_device_set_devpath_old(udev_device, &key[12]);
-               } else if (strncmp(key, "PHYSDEVPATH=", 12) == 0) {
-                       udev_device_set_physdevpath(udev_device, &key[12]);
                } else if (strncmp(key, "SEQNUM=", 7) == 0) {
                        udev_device_set_seqnum(udev_device, strtoull(&key[7], NULL, 10));
                } else if (strncmp(key, "TIMEOUT=", 8) == 0) {
                        udev_device_set_timeout(udev_device, strtoull(&key[8], NULL, 10));
-               } else if (strncmp(key, "PHYSDEV", 7) == 0) {
-                       /* suppress deprecated values */
-                       continue;
                } else {
                        udev_device_add_property_from_string(udev_device, key);
                }
index 8723cd7..7dd8e7d 100644 (file)
@@ -64,8 +64,6 @@ const char *udev_device_get_devpath_old(struct udev_device *udev_device);
 int udev_device_set_devpath_old(struct udev_device *udev_device, const char *devpath_old);
 const char *udev_device_get_knodename(struct udev_device *udev_device);
 int udev_device_set_knodename(struct udev_device *udev_device, const char *knodename);
-const char *udev_device_get_physdevpath(struct udev_device *udev_device);
-int udev_device_set_physdevpath(struct udev_device *udev_device, const char *physdevpath);
 int udev_device_get_timeout(struct udev_device *udev_device);
 int udev_device_set_timeout(struct udev_device *udev_device, int timeout);
 int udev_device_get_event_timeout(struct udev_device *udev_device);
index e4594c3..fac418e 100644 (file)
@@ -1137,8 +1137,6 @@ static int add_rule(struct udev_rules *rules, char *line,
 {
        char *linepos;
        char *attr;
-       int physdev = 0;
-       int waitfor = 0;
        struct rule_tmp rule_tmp;
 
        memset(&rule_tmp, 0x00, sizeof(struct rule_tmp));
@@ -1280,8 +1278,6 @@ static int add_rule(struct udev_rules *rules, char *line,
                                err(rules->udev, "error parsing ENV attribute\n");
                                goto invalid;
                        }
-                       if (strncmp(attr, "PHYSDEV", 7) == 0)
-                               physdev = 1;
                        if (op < OP_MATCH_MAX) {
                                if (rule_add_key(&rule_tmp, TK_M_ENV, op, value, attr) != 0)
                                        goto invalid;
@@ -1378,7 +1374,6 @@ static int add_rule(struct udev_rules *rules, char *line,
 
                if (strcasecmp(key, "WAIT_FOR") == 0 || strcasecmp(key, "WAIT_FOR_SYSFS") == 0) {
                        rule_add_key(&rule_tmp, TK_M_WAITFOR, 0, value, NULL);
-                       waitfor = 1;
                        continue;
                }
 
@@ -1536,10 +1531,6 @@ static int add_rule(struct udev_rules *rules, char *line,
                err(rules->udev, "unknown key '%s' in %s:%u\n", key, filename, lineno);
        }
 
-       if (physdev && !waitfor)
-               err(rules->udev, "PHYSDEV* values are deprecated and not available on recent kernels, "
-                   "please fix it in %s:%u\n", filename, lineno);
-
        /* add rule token */
        rule_tmp.rule.rule.token_count = 1 + rule_tmp.token_cur;
        if (add_token(rules, &rule_tmp.rule) != 0)
index 1aa50eb..ec6ee00 100644 (file)
@@ -339,7 +339,7 @@ static int compare_devpath(const char *running, const char *waiting)
        return 0;
 }
 
-/* lookup event for identical, parent, child, or physical device */
+/* lookup event for identical, parent, child device */
 static int devpath_busy(struct udev_event *event)
 {
        struct udev_list_node *loop;
@@ -390,19 +390,6 @@ static int devpath_busy(struct udev_event *event)
                        event->delaying_seqnum = udev_device_get_seqnum(loop_event->dev);
                        return 5;
                }
-
-               /* check physical device event (special case of parent) */
-               if (udev_device_get_physdevpath(event->dev) != NULL &&
-                   strcmp(udev_device_get_action(event->dev), "add") == 0)
-                       if (compare_devpath(udev_device_get_devpath(loop_event->dev),
-                                           udev_device_get_physdevpath(event->dev)) != 0) {
-                               dbg(event->udev, "%llu, physical device event still pending %llu (%s)\n",
-                                   udev_device_get_seqnum(event->dev),
-                                   udev_device_get_seqnum(loop_event->dev),
-                                   udev_device_get_devpath(loop_event->dev));
-                               event->delaying_seqnum = udev_device_get_seqnum(loop_event->dev);
-                               return 6;
-                       }
        }
        return 0;
 }