diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-04-25 21:37:51 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-25 15:37:51 -0400 |
commit | f56012a57cd216d247170b432059f6e59c364ff2 (patch) | |
tree | e2c3e7dd6432d08b343d869bee09dbabba8c2814 /src | |
parent | 0b2de9d90ddd788d8f181282607830d725bdc337 (diff) |
machined: generate a nicer error when the user tries "machinectl clone" on non-btrfs file systems (#3117)
Fixes: #2060
(Of course, in the long run, we should probably add a copy-based fall-back. But
given how slow that is, this probably requires some asynchronous forking logic
like the CopyFrom() and CopyTo() method calls already implement.)
Diffstat (limited to 'src')
-rw-r--r-- | src/machine/image-dbus.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/machine/image-dbus.c b/src/machine/image-dbus.c index 73f5112c4d..b764bc43a0 100644 --- a/src/machine/image-dbus.c +++ b/src/machine/image-dbus.c @@ -137,6 +137,8 @@ int bus_image_method_clone( return 1; /* Will call us back */ r = image_clone(image, new_name, read_only); + if (r == -EOPNOTSUPP) + return sd_bus_reply_method_errnof(message, r, "Image cloning is currently only supported on btrfs file systems."); if (r < 0) return r; |