diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-05-04 22:08:05 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-05-04 22:08:05 +0200 |
commit | e3196993f1f7fdd9fb7fbf4eeb397080554ae920 (patch) | |
tree | 7bfd7594fa46b1018db7e634a11ea0610963e817 | |
parent | efca104ccfa8894b84ad4ec56388780ff317ced7 (diff) |
remove all PHYSDEVPATH handling and warning about
-rw-r--r-- | udev/lib/libudev-device.c | 15 | ||||
-rw-r--r-- | udev/lib/libudev-monitor.c | 5 | ||||
-rw-r--r-- | udev/lib/libudev-private.h | 2 | ||||
-rw-r--r-- | udev/udev-rules.c | 9 | ||||
-rw-r--r-- | udev/udevd.c | 15 |
5 files changed, 1 insertions, 45 deletions
diff --git a/udev/lib/libudev-device.c b/udev/lib/libudev-device.c index 8e29efff86..ddc4b34115 100644 --- a/udev/lib/libudev-device.c +++ b/udev/lib/libudev-device.c @@ -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; diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c index fc904c4a7c..2540e85c34 100644 --- a/udev/lib/libudev-monitor.c +++ b/udev/lib/libudev-monitor.c @@ -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); } diff --git a/udev/lib/libudev-private.h b/udev/lib/libudev-private.h index 8723cd7914..7dd8e7dfe0 100644 --- a/udev/lib/libudev-private.h +++ b/udev/lib/libudev-private.h @@ -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); diff --git a/udev/udev-rules.c b/udev/udev-rules.c index e4594c31cd..fac418e526 100644 --- a/udev/udev-rules.c +++ b/udev/udev-rules.c @@ -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) diff --git a/udev/udevd.c b/udev/udevd.c index 1aa50eb74c..ec6ee009cd 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -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; } |