diff --git a/mtools-4.0.10-help-flag.diff b/mtools-4.0.10-help-flag.diff deleted file mode 100644 index 9e49a53..0000000 --- a/mtools-4.0.10-help-flag.diff +++ /dev/null @@ -1,47 +0,0 @@ -diff -upr mtools-4.0.10/mattrib.c mtools-4.0.10.new/mattrib.c ---- mtools-4.0.10/mattrib.c 2009-03-03 07:10:13.000000000 +0100 -+++ mtools-4.0.10.new/mattrib.c 2009-10-23 09:07:45.000000000 +0200 -@@ -168,6 +168,7 @@ void mattrib(int argc, char **argv, int - int concise; - int replay; - char *ptr; -+ int wantUsage; - - arg.add = 0; - arg.remove = 0xff; -@@ -176,11 +177,16 @@ void mattrib(int argc, char **argv, int - view = 0; - concise = 0; - replay = 0; -+ -+ wantUsage = 0; - - if(helpFlag(argc, argv)) - usage(0); -- while ((c = getopt(argc, argv, "i:/ahrsAHRSXph")) != EOF) { -+ while ((c = getopt(argc, argv, "i:/ahrsAHRSXp")) != EOF) { - switch (c) { -+ case 'h': -+ wantUsage = 1; -+ /* FALL TROUGH */ - default: - arg.remove &= ~letterToCode(c); - break; -@@ -196,13 +202,15 @@ void mattrib(int argc, char **argv, int - case 'X': - concise = 1; - break; -- case 'h': -- usage(0); - case '?': - usage(1); - } - } - -+ if(optind == argc && wantUsage) { -+ usage(0); -+ } -+ - for(;optind < argc;optind++) { - switch(argv[optind][0]) { - case '+': diff --git a/mtools.changes b/mtools.changes index a40b3e6..1a4ddbd 100644 --- a/mtools.changes +++ b/mtools.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Fri Oct 23 11:25:37 CEST 2009 - pgajdos@suse.cz - -- fixed wrong -h flag [bnc#548449] - * help-flag.diff - ------------------------------------------------------------------- Tue Sep 15 09:54:02 CEST 2009 - pgajdos@suse.cz diff --git a/mtools.spec b/mtools.spec index 332ac07..ef25a39 100644 --- a/mtools.spec +++ b/mtools.spec @@ -36,7 +36,6 @@ Patch4: %{name}-%{version}-fat-bits.diff Patch5: %{name}-%{version}-prototypes.diff Patch6: %{name}-%{version}-overflow.diff Patch7: %{name}-%{version}-file-close.diff -Patch8: %{name}-%{version}-help-flag.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -100,7 +99,6 @@ Authors: %patch5 %patch6 %patch7 -%patch8 -p1 %build %{suse_update_config -f}