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: olafBuddenhagen
Subject: Re: [PATCH 1/3] Add the ``--mount'' command line option
Date: Mon, 29 Jun 2009 01:44:41 +0200
User-agent: Mutt/1.5.19 (2009-01-05)

Hi,

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 :-(

> 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.

-antrik-




reply via email to

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