Commit 66d04802 authored by Beniamino Galvani's avatar Beniamino Galvani

checkpoint: specify path of already existing checkpoint on error

parent c90118ff
......@@ -175,10 +175,12 @@ nm_checkpoint_manager_create (NMCheckpointManager *self,
if (!NM_FLAGS_HAS (flags, NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL)) {
for (i = 0; i < devices->len; 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,
"a checkpoint for device '%s' already exists",
nm_device_get_iface (device));
"device '%s' is already included in checkpoint %s",
nm_device_get_iface (device),
nm_exported_object_get_path (NM_EXPORTED_OBJECT (checkpoint)));
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