Return EBUSY if device already open.
This commit is contained in:
parent
330f5907f2
commit
ba09c15c63
@ -178,7 +178,7 @@ int lmsopen(dev_t dev, int flag, int fmt, struct proc *p)
|
|||||||
/* Disallow multiple opens */
|
/* Disallow multiple opens */
|
||||||
|
|
||||||
if (sc->state & OPEN)
|
if (sc->state & OPEN)
|
||||||
return(ENXIO);
|
return(EBUSY);
|
||||||
|
|
||||||
/* Initialize state */
|
/* Initialize state */
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ int mmsopen(dev_t dev, int flag, int fmt, struct proc *p)
|
|||||||
/* Disallow multiple opens */
|
/* Disallow multiple opens */
|
||||||
|
|
||||||
if (sc->state & OPEN)
|
if (sc->state & OPEN)
|
||||||
return(ENXIO);
|
return(EBUSY);
|
||||||
|
|
||||||
/* Initialize state */
|
/* Initialize state */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user