1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

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.)
This commit is contained in:
Lennart Poettering 2016-04-25 21:37:51 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 0b2de9d90d
commit f56012a57c

View 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;