http://bugzilla.novell.com/show_bug.cgi?id=548449
User pgajdos@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=548449#c4
Petr Gajdos changed:
What |Removed |Added
----------------------------------------------------------------------------
Info Provider|radomir.cernoch@gmail.com |coolo@suse.de
--- Comment #4 from Petr Gajdos 2009-10-23 01:30:33 MDT ---
In the meantime, I have found solution from upstream.
Radomír, could you please try package mtools I have attached?
Simply, -h anywhere on commandline (not -H) was interpreted as help. Now, -h
means help only if it is the last parameter.
# mattrib -h
Mtools version 4.0.10, dated March 10th, 2009
Usage: mattrib [-p] [-a|+a] [-h|+h] [-r|+r] [-s|+s] msdosfile [msdosfiles..]
Else it removes hidden attribute as expected.
# mattrib -h -a -s f:/ldlinux.sys
#
Coolo, do we want this fix in 11.2? Online update?
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 '+':
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.