diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-04-02 08:46:23 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-04-02 13:44:27 +0100 |
commit | a2ba1c4f242cdaa5a1b685f0d02012b96b6103a7 (patch) | |
tree | 9e76ff70c9bde9f9d8f96ac5b2e9da710f2ccbb0 | |
parent | 4885c2ccb5a4dda71608574acce155798e23aee6 (diff) | |
download | libguestfs-a2ba1c4f242cdaa5a1b685f0d02012b96b6103a7.tar.gz libguestfs-a2ba1c4f242cdaa5a1b685f0d02012b96b6103a7.tar.xz libguestfs-a2ba1c4f242cdaa5a1b685f0d02012b96b6103a7.zip |
mkfs: Don't allow blocksize to be set on btrfs (RHBZ#807905).
(cherry picked from commit 77ac6b73cde017452d48d53aaf6fa755502b05d5)
-rw-r--r-- | daemon/mkfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/daemon/mkfs.c b/daemon/mkfs.c index 5475582d..492b6908 100644 --- a/daemon/mkfs.c +++ b/daemon/mkfs.c @@ -133,6 +133,11 @@ do_mkfs_opts (const char *fstype, const char *device, int blocksize, ADD_ARG (argv, i, "-c"); ADD_ARG (argv, i, blocksize_str); } + else if (STREQ (fstype, "btrfs")) { + /* For btrfs, blocksize cannot be specified (RHBZ#807905). */ + reply_with_error ("blocksize cannot be set on btrfs filesystems"); + return -1; + } else { /* For all other filesystem types, try the -b option. */ snprintf (blocksize_str, sizeof blocksize_str, "%d", blocksize); |