]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/device.c
udev-util: add generic device_get_{vendor,model}_string() helpers
[thirdparty/systemd.git] / src / core / device.c
index 659e52bf795af51f044d67262cc06b6211f0a50f..d07adb2d2aebdae862128e094fb67f80becec301 100644 (file)
@@ -516,9 +516,7 @@ static int device_update_description(Unit *u, sd_device *dev, const char *path)
 
         desc = path;
 
-        if (dev &&
-            (sd_device_get_property_value(dev, "ID_MODEL_FROM_DATABASE", &model) >= 0 ||
-             sd_device_get_property_value(dev, "ID_MODEL", &model) >= 0)) {
+        if (dev && device_get_model_string(dev, &model) >= 0) {
                 desc = model;
 
                 /* Try to concatenate the device model string with a label, if there is one */