diff options
author | David Sterba <dsterba@suse.cz> | 2015-06-11 00:46:30 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-06-11 00:46:30 +0200 |
commit | c848046eb984fcbeeb78d681bf483aefbb35a013 (patch) | |
tree | 73089fe97e851ebb914c4fb10925a57eb160b156 /mkfs.c | |
parent | 4647ab887a592516841f74fa47586771bbcad81b (diff) |
btrfs-progs: print error within test_dev_for_mkfs
The error string buffer passed as an argument is of a fixed size, though
we could print up to PATH_MAX + something bytes. Print the error message
directly.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'mkfs.c')
-rw-r--r-- | mkfs.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1335,10 +1335,8 @@ int main(int ac, char **av) while (dev_cnt-- > 0) { file = av[optind++]; if (is_block_device(file)) - if (test_dev_for_mkfs(file, force_overwrite, estr)) { - fprintf(stderr, "Error: %s", estr); + if (test_dev_for_mkfs(file, force_overwrite)) exit(1); - } } optind = saved_optind; |