btrfs-progs: Fix msgs in check_node_or_leaf_size
authorSebastian Thorarensen <sebth@naju.se>
Fri, 20 Mar 2015 01:10:39 +0000 (02:10 +0100)
committerDavid Sterba <dsterba@suse.cz>
Mon, 23 Mar 2015 15:53:53 +0000 (16:53 +0100)
check_node_or_leaf_size in utils.c now prints 'nodesize (or leafsize)'
instead of 'leafsize (or nodesize)' in the error messages, in order to
be less confusing for the user, as leafsize in mkfs is deprecated.
'ERROR: ' is also prepended to be consistent with other error messages.

Signed-off-by: Sebastian Thorarensen <sebth@naju.se>
Signed-off-by: David Sterba <dsterba@suse.cz>
utils.c

diff --git a/utils.c b/utils.c
index 17f31fc..73edb39 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -2725,17 +2725,17 @@ int btrfs_check_node_or_leaf_size(u32 size, u32 sectorsize)
 {
        if (size < sectorsize) {
                fprintf(stderr,
-                       "Illegal leafsize (or nodesize) %u (smaller than %u)\n",
+                       "ERROR: Illegal nodesize (or leafsize) %u (smaller than %u)\n",
                        size, sectorsize);
                return -1;
        } else if (size > BTRFS_MAX_METADATA_BLOCKSIZE) {
                fprintf(stderr,
-                       "Illegal leafsize (or nodesize) %u (larger than %u)\n",
+                       "ERROR: Illegal nodesize (or leafsize) %u (larger than %u)\n",
                        size, BTRFS_MAX_METADATA_BLOCKSIZE);
                return -1;
        } else if (size & (sectorsize - 1)) {
                fprintf(stderr,
-                       "Illegal leafsize (or nodesize) %u (not align to %u)\n",
+                       "ERROR: Illegal nodesize (or leafsize) %u (not aligned to %u)\n",
                        size, sectorsize);
                return -1;
        }