Accepting request 22902 from Base:System

Copy from Base:System/mtools based on submit request 22902 from user pgajdos

OBS-URL: https://build.opensuse.org/request/show/22902
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mtools?expand=0&rev=13
This commit is contained in:
OBS User autobuild 2009-10-23 20:08:36 +00:00 committed by Git OBS Bridge
parent 363b4be56c
commit 004a047222
3 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,47 @@
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,3 +1,9 @@
-------------------------------------------------------------------
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

@ -21,7 +21,7 @@
Name: mtools
BuildRequires: libpng texlive-latex xorg-x11 xorg-x11-devel
Version: 4.0.10
Release: 4
Release: 5
AutoReqProv: on
Group: System/Filesystems
License: GPL v3 or later
@ -36,6 +36,7 @@ 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
@ -99,6 +100,7 @@ Authors:
%patch5
%patch6
%patch7
%patch8 -p1
%build
%{suse_update_config -f}