aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2022-03-10 01:51:28 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2022-03-10 01:51:28 +0000
commit5e7262973c7b0bf753e5e560956c176d9d12424d (patch)
treedc5fd8d84f5b8aafc4ed36142bb2e55bbc2e4a31
parent6498c8fa92b6ecfce411679af47064a6fd80ff33 (diff)
downloadsg3_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
-rw-r--r--ChangeLog4
-rw-r--r--debian/changelog2
-rw-r--r--sg3_utils.spec2
-rw-r--r--src/sg_ses.c9
-rw-r--r--testing/Makefile2
5 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 39c5a9a6..3975faa6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Each utility has its own version number, date of last change and
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
-Changelog for pre-release sg3_utils-1.48 [20220309] [svn: r942]
+Changelog for pre-release sg3_utils-1.48 [20220309] [svn: r943]
- sg_z_act_query: new utility for sending either a
Zone activate or Zone query command
- sg_rep_density: new utility for decoding the response of
@@ -39,6 +39,8 @@ Changelog for pre-release sg3_utils-1.48 [20220309] [svn: r942]
- sg_opcodes: cleanup error reporting
- sg_format: allow disk formats on ZBC (zoned) disks
- sg_read_buffer: add --eh_code= and --no_output options
+ - sg_ses: add exp_sas_addr acronym for getting expander's
+ SAS address
- inhex/logs_last_n.hex: new, tests for the 4 "Last n ..."
log (sub)pages
- sg_lib: add sg_pdt_s_eq() to cope with ZBC disks which may
diff --git a/debian/changelog b/debian/changelog
index d8949b25..dc5026a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ sg3-utils (1.48-0.1) unstable; urgency=low
* New upstream version
- -- Douglas Gilbert <dgilbert@interlog.com> Sun, 06 Mar 2022 13:00:00 -0500
+ -- Douglas Gilbert <dgilbert@interlog.com> Wed, 09 Mar 2022 21:00:00 -0500
sg3-utils (1.47-0.1) unstable; urgency=low
diff --git a/sg3_utils.spec b/sg3_utils.spec
index 447018b7..dcdf3845 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -84,7 +84,7 @@ fi
%{_libdir}/*.la
%changelog
-* Sun Mar 06 2022 - dgilbert at interlog dot com
+* Wed Mar 09 2022 - dgilbert at interlog dot com
- track t10 changes
* sg3_utils-1.48
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 */
diff --git a/testing/Makefile b/testing/Makefile
index ea55cbc6..46d00a2e 100644
--- a/testing/Makefile
+++ b/testing/Makefile
@@ -49,7 +49,7 @@ LIBFILESOLD = ../lib/sg_lib.o ../lib/sg_lib_data.o ../lib/sg_io_linux.o
LIBFILESNEW = ../lib/sg_pt_linux_nvme.o ../lib/sg_lib.o ../lib/sg_lib_data.o \
../lib/sg_pt_linux.o ../lib/sg_io_linux.o \
../lib/sg_pt_common.o ../lib/sg_cmds_basic.o \
- ../lib/sg_cmds_basic2.o
+ ../lib/sg_cmds_basic2.o ../lib/sg_lib_names.o
all: $(EXECS)