diff options
author | mjacob <mjacob@FreeBSD.org> | 2000-01-17 02:02:41 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2000-01-17 02:02:41 +0000 |
commit | 0b4cd0060a509ca12e5ea1ff766835dee37bb177 (patch) | |
tree | 84c4cad8c9aee486c33c6057385870721e109e0b | |
parent | 6b3da1fe217669fc48bdbe87a215479561125599 (diff) | |
download | FreeBSD-src-0b4cd0060a509ca12e5ea1ff766835dee37bb177.zip FreeBSD-src-0b4cd0060a509ca12e5ea1ff766835dee37bb177.tar.gz |
Do not propagate the ENCI_SVALID bit for overall enclosure status
to userland apps- they get confused.
-rw-r--r-- | sys/cam/scsi/scsi_ses.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c index b7065a4..d5d6984 100644 --- a/sys/cam/scsi/scsi_ses.c +++ b/sys/cam/scsi/scsi_ses.c @@ -54,7 +54,6 @@ #include <opt_ses.h> - /* * Platform Independent Driver Internal Definitions for SES devices. */ @@ -607,8 +606,9 @@ sesioctl(dev_t dev, u_long cmd, caddr_t arg_addr, int flag, struct proc *p) error = (*ssc->ses_vec.get_encstat)(ssc, 1); if (error) break; - error = copyout(&ssc->ses_encstat, addr, sizeof (ses_encstat)); - ssc->ses_encstat &= ~ENCI_SVALID; + tmp = ssc->ses_encstat & ~ENCI_SVALID; + error = copyout(&tmp, addr, sizeof (ses_encstat)); + ssc->ses_encstat = tmp; break; case SESIOC_SETENCSTAT: @@ -1244,7 +1244,6 @@ ses_getputstat(ses_softc_t *ssc, int objid, SesComStat *sp, int slp, int in) } else { bufsiz = (ssc->ses_nobjects * 4) + (cc->ses_ntypes * 4) + 8; } - sdata = SES_MALLOC(bufsiz); if (sdata == NULL) return (ENOMEM); @@ -1397,7 +1396,7 @@ ses_getthdr(uint8_t *buffer, int amt, int nth, SesThdr *thp) * int elt * * This is the element type being sought. If elt is -1, - * then overal enclosure status is being sought. + * then overall enclosure status is being sought. * * int elm * |