mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 09:30:13 +01:00
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:
parent
4c963d719c
commit
22b76f4c58
1 changed files with 6 additions and 7 deletions
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue