diff options
author | David Sterba <dsterba@suse.com> | 2015-10-30 16:58:52 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-11-02 15:10:15 +0100 |
commit | ce059fc9d770379e10f88bb062daf2affbdb855e (patch) | |
tree | 5ffa8ee588b639f01a4770da88384c455c0ec0ee /mkfs.c | |
parent | 4f42e465cb060115e967f8097d9b63aaf65d08e4 (diff) | |
download | btrfs-progs-ce059fc9d770379e10f88bb062daf2affbdb855e.tar.gz |
btrfs-progs: mkfs: print version info first
The version info should not be preceded by any messages.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mkfs.c')
-rw-r--r-- | mkfs.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -328,7 +328,6 @@ static void print_usage(int ret) fprintf(stderr, "\t-U|--uuid UUID specify the filesystem UUID\n"); fprintf(stderr, "\t-q|--quiet no messages except errors\n"); fprintf(stderr, "\t-V|--version print the mkfs.btrfs version and exit\n"); - fprintf(stderr, "%s\n", PACKAGE_STRING); exit(ret); } @@ -1464,6 +1463,11 @@ int main(int ac, char **av) } } + if (verbose) { + printf("%s\n", PACKAGE_STRING); + printf("See %s for more information.\n\n", PACKAGE_URL); + } + sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE)); saved_optind = optind; dev_cnt = ac - optind; @@ -1587,12 +1591,6 @@ int main(int ac, char **av) if (ret) exit(1); - /* if we are here that means all devs are good to btrfsify */ - if (verbose) { - printf("%s\n", PACKAGE_STRING); - printf("See %s for more information.\n\n", PACKAGE_URL); - } - dev_cnt--; if (!source_dir_set) { |