Re: [PATCH 7/9] switch_root: clean up argv[] usage Signed-off-by: Karel Zak <kzak@xxxxxxxxxx>

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

 



On Tue, Jun 09, 2009 at 05:38:12PM -0400, Peter Jones wrote:
> On 06/09/2009 04:48 PM, Karel Zak wrote:
> > ---
> >  sys-utils/switch_root.c |   43 ++++++++++++++++++++-----------------------
> >  1 files changed, 20 insertions(+), 23 deletions(-)
> > 
> [...]
> > -static void usage(FILE *output)
> > +static void usage()
> >  {
> > -	fprintf(output, "usage: %s <newrootdir> <init> <args to init>\n",
> > +	fprintf(stderr, "usage: %s <newrootdir> <init> <args to init>\n",
> >  			program_invocation_short_name);
> > -	if (output == stderr)
> > -		exit(EXIT_FAILURE);
> > -	exit(EXIT_SUCCESS);
> > +	exit(EXIT_FAILURE);
> >  }
> 
> I think it'd be better to leave this as the old way and add --help parsing
> in main.

 Good point. I'll fix it.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux