summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-02-14 01:03:24 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-14 01:03:24 +0100
commitc18315a88da3864f29908ad299750f98e6160f42 (patch)
treefd2a8d7757c81c0b98885927b582ba82f23ccb76
parent2e478a46c3754ede1a7af57b961056a2a375a799 (diff)
device: fall back to device node path as description instead of kernel name
-rw-r--r--device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/device.c b/device.c
index c5901c95ff..1b0b50fd4e 100644
--- a/device.c
+++ b/device.c
@@ -162,9 +162,12 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
}
if ((model = udev_device_get_property_value(dev, "ID_MODEL_FROM_DATABASE")) ||
- (model = udev_device_get_property_value(dev, "ID_MODEL")))
+ (model = udev_device_get_property_value(dev, "ID_MODEL"))) {
if ((r = unit_set_description(u, model)) < 0)
goto fail;
+ } else if (dn)
+ if ((r = unit_set_description(u, dn)) < 0)
+ goto fail;
unit_add_to_load_queue(u);
} else {