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
 _parse_options (int* argc_ptr, char*** argv_ptr)
 {
-int     opt;
+int     opt, wrong = 0;
 
 while (1)
 {
@@ -2274,12 +2274,13 @@ while (1)
                 case 'm': opt_machine_mode = 1; break;
                 case 's': opt_script_mode = 1; break;
                 case 'v': _version (); break;
+                default : wrong = 1; break;
         }
 }
 
 *argc_ptr -= optind;
 *argv_ptr += optind;
-return 1;
+return !wrong;
 }
 
 static PedDevice*
-- 
1.4.4.4



_______________________________________________
bug-parted mailing list
bug-parted@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-parted

Reply via email to