OBS User autobuild 2009-10-23 20:08:34 +00:00 committed by Git OBS Bridge
parent b15557ec37
commit f6343f2794
3 changed files with 0 additions and 55 deletions

View File

@ -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 '+':

View File

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

View File

@ -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}