[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] Add reiserfs tools to appliance.



On Mon, Nov 09, 2009 at 12:26:46PM +0100, Jim Meyering wrote:
> 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";

Yes please!

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]