diff options
author | ume <ume@FreeBSD.org> | 2000-08-20 16:16:57 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2000-08-20 16:16:57 +0000 |
commit | 1c624ac57c791b6df4b51eb86e04dc404052c700 (patch) | |
tree | 5ffa29a5a2d7aa241e19cb06405335128593e8bc /sys/pccard/pccard.c | |
parent | d89ba315b05ef2cd7fa9a001561b6192bf3f2fa3 (diff) | |
download | FreeBSD-src-1c624ac57c791b6df4b51eb86e04dc404052c700.zip FreeBSD-src-1c624ac57c791b6df4b51eb86e04dc404052c700.tar.gz |
Add UNIX domain socket feature to pccardd. This makes pccard
related PAO3/ports such as gxcardmon work.
Reviewed by: imp
Obtained from: PAO3
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r-- | sys/pccard/pccard.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 298fbb5..97c2294 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -318,7 +318,7 @@ pccard_event(struct slot *slt, enum card_event event) * The slot and devices are disabled, but the * data structures are not unlinked. */ - if (slt->state == filled) { + if (slt->state == filled || slt->state == inactive) { slt->state = empty; disable_slot_to(slt); } @@ -600,11 +600,13 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) if (!pwval) { if (slt->state != filled) return EINVAL; + pccard_event(slt, card_removed); + slt->state = inactive; } else { - if (slt->state != empty) + if (slt->state != empty && slt->state != inactive) return EINVAL; + pccard_event(slt, card_inserted); } - pccard_event(slt, pwval == 0 ? card_removed : card_inserted); break; case PIOCSBEEP: if (pccard_beep_select(*(int *)data)) { |