mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 18:20:07 +01:00
libnm-glib: fix device description with newer udev versions
At some point ID_MODEL_FROM_DATABASE became what we should look for; fixes device description not being constructed for many devices.
This commit is contained in:
parent
77dda53b50
commit
b10c4778c0
1 changed files with 5 additions and 1 deletions
|
|
@ -1475,7 +1475,11 @@ nm_device_get_product (NMDevice *device)
|
|||
|
||||
priv = NM_DEVICE_GET_PRIVATE (device);
|
||||
if (!priv->product) {
|
||||
priv->product = _get_udev_property (device, "ID_MODEL_ENC", "ID_PRODUCT_FROM_DATABASE");
|
||||
priv->product = _get_udev_property (device, "ID_MODEL_ENC", "ID_MODEL_FROM_DATABASE");
|
||||
if (!priv->product) {
|
||||
/* Sometimes ID_PRODUCT_FROM_DATABASE is used? */
|
||||
priv->product = _get_udev_property (device, "ID_MODEL_ENC", "ID_PRODUCT_FROM_DATABASE");
|
||||
}
|
||||
_nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_PRODUCT);
|
||||
}
|
||||
return priv->product;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue