Richard W.M. Jones
2009-Nov-08 12:36 UTC
[Libguestfs] [PATCH] Add reiserfs tools to appliance.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw -------------- next part -------------->From 7fe17011f1b048b7292fdee169f303e492d894fb Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at redhat.com> Date: Sun, 8 Nov 2009 12:17:18 +0000 Subject: [PATCH] Add reiserfs tools to appliance. Also get the mkfs command to work with "reiserfs" parameter. --- appliance/packagelist.in | 2 ++ daemon/mkfs.c | 6 ++++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/appliance/packagelist.in b/appliance/packagelist.in index b3609df..a0cedb9 100644 --- a/appliance/packagelist.in +++ b/appliance/packagelist.in @@ -17,6 +17,7 @@ kernel MAKEDEV ntfsprogs + reiserfs-utils scrub libselinux udev @@ -25,6 +26,7 @@ bsdmainutils iproute libaugeas0 + reiserfsprogs udev util-linux #endif diff --git a/daemon/mkfs.c b/daemon/mkfs.c index 84b7298..80cd033 100644 --- a/daemon/mkfs.c +++ b/daemon/mkfs.c @@ -51,6 +51,12 @@ mkfs (const char *fstype, const char *device, if (strcmp (fstype, "ntfs") == 0) argv[i++] = "-Q"; + /* mkfs.reiserfs produces annoying interactive prompts unless you + * tell it to be quiet. + */ + if (strcmp (fstype, "reiserfs") == 0) + argv[i++] = "-f"; + for (j = 0; j < nr_extra; ++j) argv[i++] = extra[j]; -- 1.6.5.rc2
Richard W.M. Jones wrote:> Subject: [PATCH] Add reiserfs tools to appliance. > > Also get the mkfs command to work with "reiserfs" parameter. > --- > appliance/packagelist.in | 2 ++ > daemon/mkfs.c | 6 ++++++ > 2 files changed, 8 insertions(+), 0 deletions(-)...> diff --git a/daemon/mkfs.c b/daemon/mkfs.c > index 84b7298..80cd033 100644 > --- a/daemon/mkfs.c > +++ b/daemon/mkfs.c > @@ -51,6 +51,12 @@ mkfs (const char *fstype, const char *device, > if (strcmp (fstype, "ntfs") == 0) > argv[i++] = "-Q"; > > + /* mkfs.reiserfs produces annoying interactive prompts unless you > + * tell it to be quiet. > + */ > + if (strcmp (fstype, "reiserfs") == 0) > + argv[i++] = "-f";Looks fine. Would you like a patch that converts most uses of strcmp to go via the STREQ macro? I find this slightly more readable: if (STREQ (fstype, "reiserfs")) argv[i++] = "-f";