35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
From 2f9faf8348793ed577c0a3f6a7850c182762a7f0 Mon Sep 17 00:00:00 2001
|
|
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
Date: Thu, 9 Aug 2018 20:37:32 +0200
|
|
Subject: [PATCH] cli: remove assertion in nmc_device_state_to_color()
|
|
|
|
nmcli should not fail when the state device state is > ACTIVATED.
|
|
Just return an unknown color code like we used to do, and like we do
|
|
for connections.
|
|
|
|
Fixes: 31aa2cfe29beb1bb7371ff36dbbd8baebeeaa06e
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=796834
|
|
(cherry picked from commit c955d91d4bbd1aec0e00be8955ac24aecf64182f)
|
|
(cherry picked from commit 5b31dfb1a529a4c5eec6343daac22ecc81c83dc5)
|
|
---
|
|
clients/cli/devices.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/clients/cli/devices.c b/clients/cli/devices.c
|
|
index aa28678ff..be7597327 100644
|
|
--- a/clients/cli/devices.c
|
|
+++ b/clients/cli/devices.c
|
|
@@ -1470,7 +1470,7 @@ nmc_device_state_to_color (NMDeviceState state)
|
|
else if (state == NM_DEVICE_STATE_ACTIVATED)
|
|
return NM_META_COLOR_DEVICE_ACTIVATED;
|
|
|
|
- g_return_val_if_reached (NM_META_COLOR_DEVICE_UNKNOWN);
|
|
+ return NM_META_COLOR_DEVICE_UNKNOWN;
|
|
}
|
|
|
|
static void
|
|
--
|
|
2.17.1
|
|
|