From 1bba1572a057d2c6201a7f1aaba5b92763cf9773 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Tue, 3 Jun 2003 22:52:55 +0000 Subject: Open fwmem device exclusively. --- sys/dev/firewire/fwmem.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/dev/firewire') diff --git a/sys/dev/firewire/fwmem.c b/sys/dev/firewire/fwmem.c index 5471687e4265..7a0fda7bf4bd 100644 --- a/sys/dev/firewire/fwmem.c +++ b/sys/dev/firewire/fwmem.c @@ -241,6 +241,9 @@ fwmem_open (dev_t dev, int flags, int fmt, fw_proc *td) { struct fw_eui64 *eui; + if (dev->si_drv1 != NULL) + return (EBUSY); + eui = (struct fw_eui64 *)malloc(sizeof(struct fw_eui64), M_FW, M_WAITOK); if (eui == NULL) @@ -255,6 +258,8 @@ int fwmem_close (dev_t dev, int flags, int fmt, fw_proc *td) { free(dev->si_drv1, M_FW); + dev->si_drv1 = NULL; + return (0); } -- cgit v1.3