24 lines
1.0 KiB
Diff
24 lines
1.0 KiB
Diff
From bf69d42ba609389fb858c872b1523df06b382c1b Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Tue, 28 Oct 2014 12:36:17 -0400
|
|
Subject: [PATCH] snapshot: return error when snapshot exists
|
|
|
|
(cherry picked from commit 7cabba07745b388497e8c0fc19b61984167fd474)
|
|
---
|
|
src/core/snapshot.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
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 {
|
|
|