diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-28 12:36:17 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2014-11-05 16:04:37 -0500 |
commit | eae943df494919df770986bcc2b369536ed0685e (patch) | |
tree | 73fb56a6e9fad27c6217339ce7324e7f71f9ff65 | |
parent | nspawn: ignore EEXIST when creating mount point (diff) | |
download | systemd-eae943df494919df770986bcc2b369536ed0685e.tar.gz systemd-eae943df494919df770986bcc2b369536ed0685e.tar.bz2 systemd-eae943df494919df770986bcc2b369536ed0685e.zip |
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 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 { |