btrfs-progs: Fix msgs in check_node_or_leaf_size

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>
This commit is contained in:
Sebastian Thorarensen 2015-03-20 02:10:39 +01:00 committed by David Sterba
parent 50580171cb
commit 0cabc98e51
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}