From: Lennart Poettering Date: Mon, 25 Apr 2016 19:37:51 +0000 (+0200) Subject: machined: generate a nicer error when the user tries "machinectl clone" on non-btrfs... X-Git-Tag: v230~137 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f56012a57cd216d247170b432059f6e59c364ff2;p=thirdparty%2Fsystemd.git 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.) --- diff --git a/src/machine/image-dbus.c b/src/machine/image-dbus.c index 73f5112c4da..b764bc43a0d 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;