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";