diff options
author | Hyon Kim <Hyon.Kim@Sun.COM> | 2009-09-25 16:43:29 -0700 |
---|---|---|
committer | Hyon Kim <Hyon.Kim@Sun.COM> | 2009-09-25 16:43:29 -0700 |
commit | 9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bb (patch) | |
tree | 474da51b64b142f6788f9d4d3798ae0a4a3fa49a /usr/src/common/cmdparse/cmdparse.c | |
parent | ebf418d7ab5c89ce3e7fb31d6a454171f5f7f518 (diff) | |
download | illumos-joyent-9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bb.tar.gz |
PSARC/2008/687 T11 Storage Management HBA API(SM-HBA)
6795795 Provide management utility for SAS Gen-2(SAS-2 compliant) HBAs.
6795797 Provide SM-HBA wrapper library for SAS Gen-2(SAS-2 compliant) HBAs.
6795800 Provide SM-HBA Vendor Specific Library for Sun SAS-2 HBAs.
Diffstat (limited to 'usr/src/common/cmdparse/cmdparse.c')
-rw-r--r-- | usr/src/common/cmdparse/cmdparse.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr/src/common/cmdparse/cmdparse.c b/usr/src/common/cmdparse/cmdparse.c index a773311033..7a9e575d71 100644 --- a/usr/src/common/cmdparse/cmdparse.c +++ b/usr/src/common/cmdparse/cmdparse.c @@ -536,7 +536,16 @@ cmdParse(int argc, char *argv[], synTables_t synTable, void *callArgs, switch (opt) { case '?': subUsage(DETAIL_USAGE, subcommand); - exit(0); + /* + * getopt can return a '?' when no + * option letters match string. Check for + * the 'real' '?' in optopt. + */ + if (optopt == '?') { + exit(0); + } else { + exit(1); + } default: cmdOptions[i].optval = opt; if (optarg) { |