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 --- cmds-device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cmds-device.c') diff --git a/cmds-device.c b/cmds-device.c index 4fa6b4aa..3a10438b 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -52,7 +52,6 @@ static int cmd_add_dev(int argc, char **argv) DIR *dirstream = NULL; int discard = 1; int force = 0; - char estr[100]; while (1) { int c; @@ -97,9 +96,8 @@ static int cmd_add_dev(int argc, char **argv) int mixed = 0; char *path; - res = test_dev_for_mkfs(argv[i], force, estr); + res = test_dev_for_mkfs(argv[i], force); if (res) { - fprintf(stderr, "%s", estr); ret++; continue; } -- cgit v1.2.3