diff options
| author | Michael Biebl <biebl@debian.org> | 2019-03-26 23:25:23 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-03-26 23:25:23 +0100 |
| commit | 9a6dcbf895f9da01768e64b73cec88c16157d91e (patch) | |
| tree | a359958930d731e9f1b59344642e10754419fe84 /src/devices/nm-device-dummy.c | |
| parent | 964ae8cc391520440cf5aa13e2b9cc34850ea6c2 (diff) | |
New upstream version 1.16.0 upstream/1.16.0
Diffstat (limited to 'src/devices/nm-device-dummy.c')
| -rw-r--r-- | src/devices/nm-device-dummy.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/devices/nm-device-dummy.c b/src/devices/nm-device-dummy.c index a9059383..47a45342 100644 --- a/src/devices/nm-device-dummy.c +++ b/src/devices/nm-device-dummy.c @@ -17,7 +17,6 @@ #include "nm-device-dummy.h" #include <stdlib.h> -#include <string.h> #include <sys/types.h> #include "nm-act-request.h" @@ -98,19 +97,19 @@ create_and_realize (NMDevice *device, GError **error) { const char *iface = nm_device_get_iface (device); - NMPlatformError plerr; NMSettingDummy *s_dummy; + int r; s_dummy = nm_connection_get_setting_dummy (connection); g_assert (s_dummy); - plerr = nm_platform_link_dummy_add (nm_device_get_platform (device), iface, out_plink); - if (plerr != NM_PLATFORM_ERROR_SUCCESS) { + r = nm_platform_link_dummy_add (nm_device_get_platform (device), iface, out_plink); + if (r < 0) { g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_CREATION_FAILED, "Failed to create dummy interface '%s' for '%s': %s", iface, nm_connection_get_id (connection), - nm_platform_error_to_string_a (plerr)); + nm_strerror (r)); return FALSE; } |