From: Martin Pitt Date: Mon, 27 Sep 2010 18:40:22 +0000 (+0200) Subject: Fix mkfs.ext* arguments X-Git-Tag: upstream/2.1.2~592 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb813b444e95a987c4f1ceaff244e97e485598a4;p=platform%2Fupstream%2Fudisks2.git 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. --- 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);