summaryrefslogtreecommitdiff
path: root/mkfs.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-06-11 00:46:30 +0200
committerDavid Sterba <dsterba@suse.cz>2015-06-11 00:46:30 +0200
commitc848046eb984fcbeeb78d681bf483aefbb35a013 (patch)
tree73089fe97e851ebb914c4fb10925a57eb160b156 /mkfs.c
parent4647ab887a592516841f74fa47586771bbcad81b (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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mkfs.c b/mkfs.c
index 14b75bce..8bc7783e 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -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;