libnm/device: prefer FROM_DATABASE udev properties

The database has a chance to fix up over garbage strings from the device
properties and we're now known to be reasonably good at fixing up crap
there.
This commit is contained in:
Lubomir Rintel 2018-02-23 14:52:05 +01:00
parent 4c963d719c
commit 22b76f4c58

View file

@ -1350,15 +1350,14 @@ _get_udev_property (NMDevice *device,
}
udev_device_unref (udev_device);
/* Prefer the encoded value which comes directly from the device
* over the hwdata database value.
*/
if (enc_value) {
g_free (db_value);
return enc_value;
/* Prefer the hwdata database value over what comes directly
* from the device. */
if (db_value) {
g_free (enc_value);
return db_value;
}
return db_value;
return enc_value;
}
static char *