diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-02-14 01:02:46 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-02-14 01:02:46 +0100 |
commit | 2e478a46c3754ede1a7af57b961056a2a375a799 (patch) | |
tree | ced795692cd778911743b09a42bb88a090313de3 /device.c | |
parent | 6be1e7d538e12f4e5c79c1271dba90e66726d8fd (diff) |
mount,device: drop prefix from unit names to make them easily decodable
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -87,7 +87,7 @@ static UnitActiveState device_active_state(Unit *u) { return state_translation_table[DEVICE(u)->state]; } -static int device_add_escaped_name(Unit *u, const char *prefix, const char *dn, bool make_id) { +static int device_add_escaped_name(Unit *u, const char *dn, bool make_id) { char *e; int r; @@ -95,7 +95,7 @@ static int device_add_escaped_name(Unit *u, const char *prefix, const char *dn, assert(dn); assert(dn[0] == '/'); - if (!(e = unit_name_escape_path(prefix, dn+1, ".device"))) + if (!(e = unit_name_escape_path(dn+1, ".device"))) return -ENOMEM; r = unit_add_name(u, e); @@ -137,7 +137,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u return -ENOMEM; assert(sysfs[0] == '/'); - if (!(e = unit_name_escape_path("sysfs-", sysfs+1, ".device"))) + if (!(e = unit_name_escape_path(sysfs+1, ".device"))) return -ENOMEM; if (!(u = manager_get_unit(m, e))) { @@ -173,12 +173,12 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u } if (dn) - if ((r = device_add_escaped_name(u, "node-", dn, true)) < 0) + if ((r = device_add_escaped_name(u, dn, true)) < 0) goto fail; first = udev_device_get_devlinks_list_entry(dev); udev_list_entry_foreach(item, first) - if ((r = device_add_escaped_name(u, "node-", udev_list_entry_get_name(item), false)) < 0) + if ((r = device_add_escaped_name(u, udev_list_entry_get_name(item), false)) < 0) goto fail; if (names) { @@ -252,7 +252,7 @@ static int device_process_removed_device(Manager *m, struct udev_device *dev) { return -ENOMEM; assert(sysfs[0] == '/'); - if (!(e = unit_name_escape_path("sysfs-", sysfs+1, ".device"))) + if (!(e = unit_name_escape_path(sysfs+1, ".device"))) return -ENOMEM; u = manager_get_unit(m, e); |