[PATCH] Abort on invalid options.

2007-04-05 Thread bensberg
From: Benno Schulenberg <[EMAIL PROTECTED]> --- parted/parted.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/parted/parted.c b/parted/parted.c index 4107ae0..0a1d225 100644 --- a/parted/parted.c +++ b/parted/parted.c @@ -2259,7 +2259,7 @@ _version () static int _

Re: [PATCH] Abort on invalid options.

2007-04-05 Thread Benno Schulenberg
Otavio Salvador wrote: > [EMAIL PROTECTED] writes: > > From: Benno Schulenberg <[EMAIL PROTECTED]> > > > > _parse_options (int* argc_ptr, char*** argv_ptr) > > { > > [snip] > > } > > > > +if (wrong == 1) > > +return 0; > > + > > *argc_ptr -= optind; > > *argv_ptr += optind; > > return

Re: [PATCH] Abort on invalid options.

2007-04-05 Thread Otavio Salvador
[EMAIL PROTECTED] writes: > From: Benno Schulenberg <[EMAIL PROTECTED]> > > --- > parted/parted.c |6 +- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/parted/parted.c b/parted/parted.c > index 4107ae0..f672969 100644 > --- a/parted/parted.c > +++ b/parted/parted.c >

Re: [PATCH] Abort on invalid options.

2007-04-05 Thread Benno Schulenberg
[EMAIL PROTECTED] wrote: > case 'v': _version (); break; > +default : wrong = 1; break; > } Sorry Octavio, didn't see your mail before sending in the first improved patch that reads all options before aborting. Tested, works here. Benno __

[PATCH] Abort on invalid options.

2007-04-05 Thread bensberg
From: Benno Schulenberg <[EMAIL PROTECTED]> --- parted/parted.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/parted/parted.c b/parted/parted.c index 4107ae0..f672969 100644 --- a/parted/parted.c +++ b/parted/parted.c @@ -2259,7 +2259,7 @@ _version () static int

[PATCH] Abort on invalid options.

2007-04-05 Thread bensberg
From: Benno Schulenberg <[EMAIL PROTECTED]> --- parted/parted.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/parted/parted.c b/parted/parted.c index 4107ae0..74a5a41 100644 --- a/parted/parted.c +++ b/parted/parted.c @@ -2259,7 +2259,7 @@ _version () static int