manager: downgrade error message for missing dependencies

At startup the manager tries to create virtual devices without a
specific order and spits warnings when a device can't be realized
because the parent device is not yet created. These failures are not
something the user should worry about because the creation will be
retried when the parent appears.

A better approach is to return an error code from the device's
create_and_realize() telling that it failed because the parent doesn't
exist. In this way, the manager knows that the device isn't ready and
can avoid printing warning messages.
This commit is contained in:
Beniamino Galvani
2017-09-14 09:26:51 +02:00
parent 74845f80ec
commit 41b0e8c5a5
7 changed files with 20 additions and 10 deletions

View File

@@ -143,6 +143,8 @@ GQuark nm_crypto_error_quark (void);
* activation request (eg, the #NMAccessPoint or #NMWimaxNsp) was not
* found.
* @NM_DEVICE_ERROR_VERSION_ID_MISMATCH: the version id did not match.
* @NM_DEVICE_ERROR_MISSING_DEPENDENCIES: the requested operation could not
* be completed due to missing dependencies.
*
* Device-related errors.
*
@@ -160,6 +162,7 @@ typedef enum {
NM_DEVICE_ERROR_NOT_ALLOWED, /*< nick=NotAllowed >*/
NM_DEVICE_ERROR_SPECIFIC_OBJECT_NOT_FOUND, /*< nick=SpecificObjectNotFound >*/
NM_DEVICE_ERROR_VERSION_ID_MISMATCH, /*< nick=VersionIdMismatch >*/
NM_DEVICE_ERROR_MISSING_DEPENDENCIES, /*< nick=MissingDependencies >*/
} NMDeviceError;
#define NM_DEVICE_ERROR nm_device_error_quark ()