From c848046eb984fcbeeb78d681bf483aefbb35a013 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 11 Jun 2015 00:46:30 +0200 Subject: 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 --- mkfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mkfs.c') 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; -- cgit v1.2.3