ifcfg-rh: correct the error handling for NM_CONTROLLED=no connections

We ought to set an error if we're returning NULL from
connection_from_file_full(). Also, printing out a warning ourselves makes no
sense -- the caller communicates this if we signal an error by returning NULL.
This commit is contained in:
Lubomir Rintel
2015-07-02 14:46:58 +02:00
parent 3b853de2e9
commit e27aa5b4d7

View File

@@ -4736,7 +4736,8 @@ connection_from_file_full (const char *filename,
connection = create_unhandled_connection (filename, parsed, "unmanaged", out_unhandled);
if (!connection)
PARSE_WARNING ("NM_CONTROLLED was false but device was not uniquely identified; device will be managed");
g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED,
"NM_CONTROLLED was false but device was not uniquely identified; device will be managed");
goto done;
}