summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-21 03:23:30 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-21 03:23:30 +0200
commit0d9068141e07ba29483ebe8bc4aaed6aacde1562 (patch)
tree41049c46e80533fca8c4ecef8bff7e4711381814 /device.c
parent8e2f43b376b797784d2c3534143e28d50c0994c0 (diff)
device: don't allow definiing additional aliases via SYSTEMD_NAMES
Diffstat (limited to 'device.c')
-rw-r--r--device.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/device.c b/device.c
index ddd05b35a0..ea33101b7f 100644
--- a/device.c
+++ b/device.c
@@ -155,7 +155,7 @@ static int device_find_escape_name(Manager *m, const char *dn, Unit **_u) {
}
static int device_process_new_device(Manager *m, struct udev_device *dev, bool update_state) {
- const char *dn, *names, *wants, *sysfs, *expose, *model;
+ const char *dn, *wants, *sysfs, *expose, *model;
Unit *u = NULL;
int r;
char *w, *state;
@@ -182,7 +182,6 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
/* Check whether this entry is even relevant for us. */
dn = udev_device_get_devnode(dev);
- names = udev_device_get_property_value(dev, "SYSTEMD_NAMES");
wants = udev_device_get_property_value(dev, "SYSTEMD_WANTS");
if ((r = device_find_escape_name(m, sysfs, &u)) < 0)
@@ -247,27 +246,6 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
if ((r = unit_set_description(u, dn)) < 0)
goto fail;
- /* We don't remove names that are gone. But that should be
- * fine and should probably be fixed only on a configuration
- * refresh. */
-
- if (names) {
- FOREACH_WORD(w, l, names, state) {
- char *e;
-
- if (!(e = strndup(w, l))) {
- r = -ENOMEM;
- goto fail;
- }
-
- r = unit_add_name(u, e);
- free(e);
-
- if (r < 0 && r != -EEXIST)
- goto fail;
- }
- }
-
if (wants) {
FOREACH_WORD(w, l, wants, state) {
char *e;