diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-02-23 14:52:05 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-02-23 19:47:19 +0100 |
commit | 22b76f4c58ffe096296576665ca15abb98461d04 (patch) | |
tree | 23d261976d9c420e5dba4900932ab6b533aff044 /libnm | |
parent | 4c963d719c4892e82c997e63bd21ac88f23dcb17 (diff) | |
download | NetworkManager-22b76f4c58ffe096296576665ca15abb98461d04.tar.gz |
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.
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/nm-device.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 584dc363fc..6d24840b06 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -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 * |