diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2011-05-18 14:58:31 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2011-05-18 14:58:31 +0000 |
commit | acbad402f6cdfdd38bbda4315e1730467d7b62ca (patch) | |
tree | e4d26fa4004bdb88f2948e305e05498e9988ce01 /src/sg_modes.c | |
parent | 0d4480a31abf1c9dd719ce552409894164dc35c1 (diff) | |
download | sg3_utils-acbad402f6cdfdd38bbda4315e1730467d7b62ca.tar.gz |
sg_ses: rework descriptor output and indexes
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@397 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_modes.c')
-rw-r--r-- | src/sg_modes.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sg_modes.c b/src/sg_modes.c index 540e0746..29c2dd5a 100644 --- a/src/sg_modes.c +++ b/src/sg_modes.c @@ -26,7 +26,7 @@ */ -static char * version_str = "1.34 20101028"; +static char * version_str = "1.35 20110517"; #define DEF_ALLOC_LEN (1024 * 4) #define DEF_6_ALLOC_LEN 252 @@ -184,6 +184,8 @@ usage_for(const struct opts_t * optsp) usage_old(); } +/* Processes command line options according to new option format. Returns + * 0 is ok, else SG_LIB_SYNTAX_ERROR is returned. */ static int process_cl_new(struct opts_t * optsp, int argc, char * argv[]) { @@ -317,6 +319,8 @@ process_cl_new(struct opts_t * optsp, int argc, char * argv[]) return 0; } +/* Processes command line options according to old option format. Returns + * 0 is ok, else SG_LIB_SYNTAX_ERROR is returned. */ static int process_cl_old(struct opts_t * optsp, int argc, char * argv[]) { @@ -462,6 +466,12 @@ process_cl_old(struct opts_t * optsp, int argc, char * argv[]) return 0; } +/* Process command line options. First check using new option format unless + * the SG3_UTILS_OLD_OPTS environment variable is defined which causes the + * old option format to be checked first. Both new and old format can be + * countermanded by a '-O' and '-N' options respectively. As soon as either + * of these options is detected (when processing the other format), processing + * stops and is restarted using the other format. Clear? */ static int process_cl(struct opts_t * optsp, int argc, char * argv[]) { |