summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-04-19 13:17:18 +0200
committerLubomir Rintel <lkundrak@v3.sk>2016-04-19 13:32:28 +0200
commitdda8e24a214a8a1f4057e48b13f1f7af8c01de4f (patch)
treec521cac4f297c29f6a913ea50efc89f4e45cd566
parentf9a0aface38ec4ea21dfd9ae8e4e3d6777b372e6 (diff)
downloadNetworkManager-dda8e24a214a8a1f4057e48b13f1f7af8c01de4f.tar.gz
infiniband: consistently use the error code
Only report CREATION_FAILED when we did actually attempt creation.
-rw-r--r--src/devices/nm-device-infiniband.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/nm-device-infiniband.c b/src/devices/nm-device-infiniband.c
index a27af3144b..956aac560f 100644
--- a/src/devices/nm-device-infiniband.c
+++ b/src/devices/nm-device-infiniband.c
@@ -240,7 +240,7 @@ create_and_realize (NMDevice *device,
NMPlatformError plerr;
if (!NM_IS_DEVICE_INFINIBAND (parent)) {
- g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_CREATION_FAILED,
+ g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
"Parent interface %s must be an InfiniBand interface",
nm_device_get_iface (parent));
return FALSE;
@@ -251,14 +251,14 @@ create_and_realize (NMDevice *device,
/* Can only create partitions at this time */
p_key = nm_setting_infiniband_get_p_key (s_infiniband);
if (p_key < 0) {
- g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_CREATION_FAILED,
+ g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
"only InfiniBand partitions can be created");
return FALSE;
}
parent_ifindex = nm_device_get_ifindex (parent);
if (parent_ifindex <= 0) {
- g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_CREATION_FAILED,
+ g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
"failed to get InfiniBand parent %s ifindex",
nm_device_get_iface (parent));
return FALSE;