diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2022-03-10 01:51:28 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2022-03-10 01:51:28 +0000 |
commit | 5e7262973c7b0bf753e5e560956c176d9d12424d (patch) | |
tree | dc5fd8d84f5b8aafc4ed36142bb2e55bbc2e4a31 /src | |
parent | 6498c8fa92b6ecfce411679af47064a6fd80ff33 (diff) | |
download | sg3_utils-5e7262973c7b0bf753e5e560956c176d9d12424d.tar.gz |
sg_ses: add exp_sas_addr acronym for getting expander's SAS address
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@943 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src')
-rw-r--r-- | src/sg_ses.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sg_ses.c b/src/sg_ses.c index 7d43711d..e6e1270b 100644 --- a/src/sg_ses.c +++ b/src/sg_ses.c @@ -38,7 +38,7 @@ * commands tailored for SES (enclosure) devices. */ -static const char * version_str = "2.56 20220218"; /* ses4r04 */ +static const char * version_str = "2.57 20220309"; /* ses4r04 */ #define MX_ALLOC_LEN ((64 * 1024) - 4) /* max allowable for big enclosures */ #define MX_ELEM_HDR 1024 @@ -715,6 +715,7 @@ static struct acronym2tuple ae_sas_a2t_arr[] = { {"num_phys", -1, 4, 7, 8, "number of phys"}, {"phy_id", -1, 28, 7, 8, NULL}, {"sas_addr", -1, 20, 7, 64, NULL}, /* should be disk or tape ... */ + {"exp_sas_addr", -1, 8, 7, 64, NULL}, /* expander address */ {"sata_dev", -1, 11, 0, 1, NULL}, {"sata_port_sel", -1, 11, 7, 1, NULL}, {"smp_init", -1, 10, 1, 1, NULL}, @@ -5685,6 +5686,12 @@ main(int argc, char * argv[]) if (SET_OPT == cgs_clp->cgs_sel) tavp->val = DEF_SET_VAL; } + if (!strcmp(cgs_clp->cgs_str, "sas_addr") && op->dev_slot_num < 0) { + pr2serr("--get=sas_addr requires --dev-slot-num. For expander " + "SAS address, use exp_sas_addr instead.\n"); + ret = SG_LIB_SYNTAX_ERROR; + goto err_out; + } tavp->cgs_sel = cgs_clp->cgs_sel; } /* keep this descending for loop directly after ascending for loop */ |