From bb813b444e95a987c4f1ceaff244e97e485598a4 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 27 Sep 2010 20:40:22 +0200 Subject: [PATCH] Fix mkfs.ext* arguments Pass exactly one -F argument to mkfs.ext*, not one for each D-BUS method option that we got (which meant none at all if there were no options). This fixes creating ext* file systems on unpartitioned devices when supplying no option. --- src/helpers/job-mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/job-mkfs.c b/src/helpers/job-mkfs.c index e363484..52db903 100644 --- a/src/helpers/job-mkfs.c +++ b/src/helpers/job-mkfs.c @@ -136,9 +136,9 @@ main (int argc, s = g_string_new ("mkfs."); g_string_append (s, fstype); + g_string_append (s, " -F "); for (n = 0; options[n] != NULL; n++) { - g_string_append (s, " -F "); if (g_str_has_prefix (options[n], "label=")) { label = strdup (options[n] + sizeof("label=") - 1); -- 2.7.4