platform: silence error reading sysctl for non existing device

https://bugzilla.gnome.org/show_bug.cgi?id=770378
This commit is contained in:
Thomas Haller
2016-08-25 13:11:21 +02:00
parent 2a314557c7
commit c930b7b4fe

View File

@@ -2687,6 +2687,7 @@ sysctl_get (NMPlatform *platform, const char *path)
if (!g_file_get_contents (path, &contents, NULL, &error)) {
/* We assume FAILED means EOPNOTSUP */
if ( g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)
|| g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NODEV)
|| g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_FAILED))
_LOGD ("error reading %s: %s", path, error->message);
else