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 <thaller@redhat.com>
This commit is contained in:
@@ -1780,10 +1780,7 @@ link_get_physical_port_id (NMPlatform *platform, int ifindex)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
path = g_strdup_printf ("/sys/class/net/%s/phys_port_id", ifname);
|
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, TRUE);
|
||||||
id = sysctl_get (platform, path, FALSE);
|
|
||||||
else
|
|
||||||
id = NULL;
|
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
|
Reference in New Issue
Block a user