summaryrefslogtreecommitdiff
path: root/cmds-device.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 /cmds-device.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 'cmds-device.c')
-rw-r--r--cmds-device.c4
1 files changed, 1 insertions, 3 deletions
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;
}