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:33:32 +0200
commit6223d32e901b81cb909d9314ec907cd24c1e1f44 (patch)
tree5c2ee98c5ff57d2866a293978b865f9257f0f93a
parentaf7321ae3fac08b1b29d89488bdb489cf627a1d0 (diff)
downloadNetworkManager-6223d32e901b81cb909d9314ec907cd24c1e1f44.tar.gz
infiniband: consistently use the error code
Only report CREATION_FAILED when we did actually attempt creation. (cherry picked from commit dda8e24a214a8a1f4057e48b13f1f7af8c01de4f)
-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;