diff options
author | ngie <ngie@FreeBSD.org> | 2015-12-15 19:52:02 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-12-15 19:52:02 +0000 |
commit | 3fed53d02350ae9cbd7b2786b72b83d2e292b8d1 (patch) | |
tree | 57320bb171eaf81a24aa51f751919d972710edf9 /usr.sbin/sesutil/sesutil.c | |
parent | 17ca717571c27f52897c406a71864f864ca65710 (diff) | |
parent | 3713a6d4d1859668807d1f8c46fc21b15334f7c9 (diff) | |
download | FreeBSD-src-3fed53d02350ae9cbd7b2786b72b83d2e292b8d1.zip FreeBSD-src-3fed53d02350ae9cbd7b2786b72b83d2e292b8d1.tar.gz |
MFhead @ r292285
Diffstat (limited to 'usr.sbin/sesutil/sesutil.c')
-rw-r--r-- | usr.sbin/sesutil/sesutil.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/usr.sbin/sesutil/sesutil.c b/usr.sbin/sesutil/sesutil.c index 5c96070..0f04c07 100644 --- a/usr.sbin/sesutil/sesutil.c +++ b/usr.sbin/sesutil/sesutil.c @@ -302,6 +302,7 @@ static int objmap(int argc, char **argv __unused) { struct sbuf *extra; + encioc_string_t stri; encioc_elm_devnames_t e_devname; encioc_elm_status_t e_status; encioc_elm_desc_t e_desc; @@ -310,6 +311,7 @@ objmap(int argc, char **argv __unused) int fd; unsigned int j, nobj; size_t i; + char str[32]; if (argc != 1) { usage(stderr, "map"); @@ -355,6 +357,15 @@ objmap(int argc, char **argv __unused) } printf("%s:\n", g.gl_pathv[i] + 5); + stri.bufsiz = sizeof(str); + stri.buf = &str[0]; + if (ioctl(fd, ENCIOC_GETENCNAME, (caddr_t) &stri) == 0) + printf("\tEnclosure Name: %s\n", stri.buf); + stri.bufsiz = sizeof(str); + stri.buf = &str[0]; + if (ioctl(fd, ENCIOC_GETENCID, (caddr_t) &stri) == 0) + printf("\tEnclosure ID: %s\n", stri.buf); + for (j = 0; j < nobj; j++) { /* Get the status of the element */ memset(&e_status, 0, sizeof(e_status)); |