-static const char *get_model(sd_device *d) {
- const char *model;
-
- assert(d);
-
- if (sd_device_get_property_value(d, "ID_MODEL_FROM_DATABASE", &model) >= 0)
- return model;
-
- if (sd_device_get_property_value(d, "ID_MODEL", &model) >= 0)
- return model;
-
- return NULL;
-}
-