bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 1/3] Add the ``--mount'' command line option


From: Sergiu Ivanov
Subject: Re: [PATCH 1/3] Add the ``--mount'' command line option
Date: Mon, 29 Jun 2009 21:14:56 +0300
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

On Mon, Jun 29, 2009 at 01:44:41AM +0200, olafBuddenhagen@gmx.net wrote:
> On Wed, Jun 17, 2009 at 01:43:42AM +0200, Thomas Schwinge wrote:
> > On Mon, Jun 15, 2009 at 10:39:22PM +0300, Sergiu Ivanov wrote:
> 
> > > --- a/options.c
> > > +++ b/options.c
> > > @@ -124,6 +131,13 @@ argp_parse_common_options (int key, char *arg, 
> > > struct argp_state *state)
> > >        ulfs_match = 0;
> > >        break;
> > >  
> > > +    case OPT_MOUNT:
> > > +      /* TODO: Improve the mountee command line parsing mechanism.  */
> > > +      err = argz_create_sep (arg, ' ', &mountee_argz, &mountee_argz_len);
> > 
> > If I understand it correctly, indeed: doing it this way, you loose the
> > ability to pass strings containing ``quoted space characters'', i.e. ones
> > that do not separate arguments.
> 
> Indeed, the command line should be parsed exactly the same as on normal
> program startup... I assumed that argz_create_sep() would do that; but
> if it doesn't, we are in trouble :-(

Thomas said he remembered that some programs do find a way out of this
situation. So, I hope he will help me in finding such a program.
 
> > If only one --mount option is allowed, what about a syntax like this one,
> > separating the mountee command line with two dashes?
> > 
> >     unionfs [OPTION...] --mount [FILESYSTEMS...] -- MOUNTEE_CMD_LINE
> 
> That is similar to what the first patch did. It's pretty ugly IMHO.

OTOH, it is easier to do normal argument parsing for the mountee
command line. Also, I'd still stand for creating a ``stand-alone''
unionmount translator which could be invoked like

 $ settrans -a <node> unionmount <mountee>

Note, that using something like settrans --unionmount could also solve
the argument parsing problem, since the mountee command line could be
parsed by settrans, then the mountee started by settrans, too, the
corresponding unioning translator being expected to only merge the
filesystems.

Yet, I don't really see what is wrong with the first usage (settrans
-a <node> unionmount <mountee>) as compared to the ``--mount'' option
in unionfs. This latter way of actions (``--mount'' option) has always
appeared to me as a pretty transitional stuff.

Regards,
scolobb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]