summaryrefslogtreecommitdiff
path: root/src/core/snapshot.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-28 12:36:17 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-30 20:38:33 -0400
commit7cabba07745b388497e8c0fc19b61984167fd474 (patch)
tree71f07cbd906ceea4601048f66170b368eca78d59 /src/core/snapshot.c
parent7358dc029ab8cb8f9d83eb847389d84f822ccfe8 (diff)
snapshot: return error when snapshot exists
Diffstat (limited to 'src/core/snapshot.c')
-rw-r--r--src/core/snapshot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/snapshot.c b/src/core/snapshot.c
index 5eed615a1..c2678cbe6 100644
--- a/src/core/snapshot.c
+++ b/src/core/snapshot.c
@@ -208,7 +208,7 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, sd_bus_error *e,
return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Unit name %s lacks snapshot suffix.", name);
if (manager_get_unit(m, name))
- sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
+ return sd_bus_error_setf(e, BUS_ERROR_UNIT_EXISTS, "Snapshot %s exists already.", name);
} else {