summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-10-11 18:28:13 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-10-14 22:22:55 +0200
commitebc42cf28acae39d813a9c8bcc172099250be279 (patch)
tree5805053319b88b0303cddb87be88b386eed7b9fb
parent77508aea59c0d6b826f15d1717b241d2d0121c79 (diff)
core/device: demote "strictly unamanged" errorlr/unmanaged-err
The "device ... not available because device is strictly unmanaged" is almost certainly the least interesting of the reasons why connection can't be activated on a device. Invent a new error level for it and demote it. Before: Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged). After Error: Connection activation failed: No suitable device found for this connection (device eth0 not available because profile is not compatible with device (...)).
-rw-r--r--src/core/devices/nm-device.c2
-rw-r--r--src/libnm-glib-aux/nm-shared-utils.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index b5c368ebad..c297e8f071 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -14839,7 +14839,7 @@ _nm_device_check_connection_available(NMDevice *self,
if (!nm_device_get_managed(self, TRUE)) {
/* device is strictly unmanaged by authoritative unmanaged reasons. */
nm_utils_error_set_literal(error,
- NM_UTILS_ERROR_CONNECTION_AVAILABLE_UNMANAGED_DEVICE,
+ NM_UTILS_ERROR_CONNECTION_AVAILABLE_STRICTLY_UNMANAGED_DEVICE,
"device is strictly unmanaged");
return FALSE;
}
diff --git a/src/libnm-glib-aux/nm-shared-utils.h b/src/libnm-glib-aux/nm-shared-utils.h
index c1325a8c41..66ded655e2 100644
--- a/src/libnm-glib-aux/nm-shared-utils.h
+++ b/src/libnm-glib-aux/nm-shared-utils.h
@@ -975,6 +975,7 @@ typedef enum {
* message from the device that returned the *highest* error code,
* in the hope that this message makes the most sense for the caller.
* */
+ NM_UTILS_ERROR_CONNECTION_AVAILABLE_STRICTLY_UNMANAGED_DEVICE,
NM_UTILS_ERROR_CONNECTION_AVAILABLE_INCOMPATIBLE,
NM_UTILS_ERROR_CONNECTION_AVAILABLE_UNMANAGED_DEVICE,
NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,