summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-10-21 16:05:09 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2017-11-09 10:12:15 +0100
commit66d048023c780f6581a568b46efa29b1fadd7dbc (patch)
treef459bc4fa06c5da160c28a7494c9750ab5b0ab24
parentc90118ff602114f6c86ff916bc036c8d917f93c4 (diff)
downloadNetworkManager-66d048023c780f6581a568b46efa29b1fadd7dbc.tar.gz
checkpoint: specify path of already existing checkpoint on error
-rw-r--r--src/nm-checkpoint-manager.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nm-checkpoint-manager.c b/src/nm-checkpoint-manager.c
index 033c11cc43..46d6a14019 100644
--- a/src/nm-checkpoint-manager.c
+++ b/src/nm-checkpoint-manager.c
@@ -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;
}
}