diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-28 12:36:17 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-30 20:38:33 -0400 |
commit | 7cabba07745b388497e8c0fc19b61984167fd474 (patch) | |
tree | 71f07cbd906ceea4601048f66170b368eca78d59 | |
parent | 7358dc029ab8cb8f9d83eb847389d84f822ccfe8 (diff) |
snapshot: return error when snapshot exists
-rw-r--r-- | src/core/snapshot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/snapshot.c b/src/core/snapshot.c index 5eed615a15..c2678cbe6e 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 { |