Commit de5de2d4 authored by Beniamino Galvani's avatar Beniamino Galvani

checkpoint: specify path of already existing checkpoint on error

(cherry picked from commit 66d04802)
parent cba96142
...@@ -175,10 +175,12 @@ nm_checkpoint_manager_create (NMCheckpointManager *self, ...@@ -175,10 +175,12 @@ nm_checkpoint_manager_create (NMCheckpointManager *self,
if (!NM_FLAGS_HAS (flags, NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL)) { if (!NM_FLAGS_HAS (flags, NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL)) {
for (i = 0; i < devices->len; i++) { for (i = 0; i < devices->len; i++) {
device = devices->pdata[i]; device = devices->pdata[i];
if (find_checkpoint_for_device (self, device)) { checkpoint = find_checkpoint_for_device (self, device);
if (checkpoint) {
g_set_error (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_INVALID_ARGUMENTS, g_set_error (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_INVALID_ARGUMENTS,
"a checkpoint for device '%s' already exists", "device '%s' is already included in checkpoint %s",
nm_device_get_iface (device)); nm_device_get_iface (device),
nm_exported_object_get_path (NM_EXPORTED_OBJECT (checkpoint)));
return NULL; return NULL;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment