diff options
author | mav <mav@FreeBSD.org> | 2012-05-24 14:07:44 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-05-24 14:07:44 +0000 |
commit | 96f3e42ce2c9de14b3e9a1de338ed639c1c8b596 (patch) | |
tree | 40272ce66d9fbbbec27ad859c9e9a595d6716bd3 /share/examples/ses/srcs/setobjstat.c | |
parent | 5b4a3e5f4a4045127c253ffac2a618946f83912b (diff) | |
download | FreeBSD-src-96f3e42ce2c9de14b3e9a1de338ed639c1c8b596.zip FreeBSD-src-96f3e42ce2c9de14b3e9a1de338ed639c1c8b596.tar.gz |
MFprojects/zfsd:
Revamp the CAM enclosure services driver.
This updated driver uses an in-kernel daemon to track state changes and
publishes physical path location information\for disk elements into the
CAM device database.
Sponsored by: Spectra Logic Corporation
Sponsored by: iXsystems, Inc.
Submitted by: gibbs, will, mav
Diffstat (limited to 'share/examples/ses/srcs/setobjstat.c')
-rw-r--r-- | share/examples/ses/srcs/setobjstat.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/share/examples/ses/srcs/setobjstat.c b/share/examples/ses/srcs/setobjstat.c index 08fdb7b..26a5dd1 100644 --- a/share/examples/ses/srcs/setobjstat.c +++ b/share/examples/ses/srcs/setobjstat.c @@ -33,18 +33,21 @@ */ #include <unistd.h> +#include <stddef.h> +#include <stdint.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <sys/ioctl.h> -#include SESINC +#include <cam/scsi/scsi_all.h> +#include <cam/scsi/scsi_enc.h> int main(int a, char **v) { int fd; int i; - ses_objstat obj; + encioc_elm_status_t obj; long cvt; char *x; @@ -64,7 +67,7 @@ usage: if (x == v[2]) { goto usage; } - obj.obj_id = cvt; + obj.elm_idx = cvt; for (i = 0; i < 4; i++) { x = v[3 + i]; cvt = strtol(v[3 + i], &x, 0); @@ -73,8 +76,8 @@ usage: } obj.cstat[i] = cvt; } - if (ioctl(fd, SESIOC_SETOBJSTAT, (caddr_t) &obj) < 0) { - perror("SESIOC_SETOBJSTAT"); + if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &obj) < 0) { + perror("ENCIOC_SETELMSTAT"); } (void) close(fd); return (0); |