From 2fd8d40a5a009aaf33365a9a985d1c72fb20324d Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 30 Jan 2014 16:33:55 +0100 Subject: [PATCH] core/platform: silence error about reading sysctl file phys_port_id It is common that the file exists, but cannot be read (Operation not supported). So, silence any error when reading the phys_port_id file. Signed-off-by: Thomas Haller --- src/platform/nm-linux-platform.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 0a1dfac52..e42b14e82 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -1780,10 +1780,7 @@ link_get_physical_port_id (NMPlatform *platform, int ifindex) return NULL; path = g_strdup_printf ("/sys/class/net/%s/phys_port_id", ifname); - if (g_file_test (path, G_FILE_TEST_EXISTS)) - id = sysctl_get (platform, path, FALSE); - else - id = NULL; + id = sysctl_get (platform, path, TRUE); g_free (path); return id;