]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machined: generate a nicer error when the user tries "machinectl clone" on non-btrfs...
authorLennart Poettering <lennart@poettering.net>
Mon, 25 Apr 2016 19:37:51 +0000 (21:37 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 25 Apr 2016 19:37:51 +0000 (15:37 -0400)
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.)

src/machine/image-dbus.c

index 73f5112c4da9080c732131509eaf2b7f9e91bdde..b764bc43a0d9d920eb6d0e6f110cf71929598cd8 100644 (file)
@@ -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;