Ticket 29: uuid_cli option character does not show invalid option, but '?'
$ ./uuid -h
/tmp/uuid-0.9.0/.libs/lt-uuid: invalid option -- h
uuid:ERROR: invalid option '?'
usage: uuid [-1] [-n count] [-a] [-d] [-o filename] [UUID]
It should perhaps print "invalid option 'h'" instead. To fix, edit uuid_cli.c's switch() default: branch to use optopt instead of ch, line #132 in 0.9.0 (fixed version shown):
127 usage("invalid version on option 'v'");
128 break;
129 }
130 break;
131 default:
132 usage("invalid option '%c'", optopt);
133 }
134 }
135 argv += optind;
136 argc -= optind;
137 if (count == -1)
Remarks:
patch is attached.
Properties:
Type: |
code |
|
Version: |
0.9.0 |
Status: |
closed |
|
Created: |
2004-Jan-12 15:22 |
Severity: |
5 |
|
Last Change: |
2004-Jan-13 10:30 |
Priority: |
3 |
|
Subsystem: |
uuid |
Assigned To: |
rse |
|
Derived From: |
|
Creator: |
anonymous |
Related Check-ins:
2004-Jan-13 10:29 |
• |
Check-in [4316]: Print involved option character (instead of '?') on invalid option for uuid(1) CLI. Submitted by: Matthias Andree <matthias.andree@gmx.de> PR: 29 (By rse) |
Attachments: