modify comments

This commit is contained in:
cg 2003-08-15 02:31:13 +00:00
parent d762c77b6d
commit 62de750667

View File

@ -214,20 +214,28 @@ dsp_open(dev_t i_dev, int flags, int mode, struct thread *td)
wrch = i_dev->si_drv2; wrch = i_dev->si_drv2;
if ((dsp_get_flags(i_dev) & SD_F_SIMPLEX) && (rdch || wrch)) { if ((dsp_get_flags(i_dev) & SD_F_SIMPLEX) && (rdch || wrch)) {
/* simplex device, already open, exit */ /* we're a simplex device and already open, no go */
pcm_unlock(d); pcm_unlock(d);
splx(s); splx(s);
return EBUSY; return EBUSY;
} }
if (((flags & FREAD) && rdch) || ((flags & FWRITE) && wrch)) { if (((flags & FREAD) && rdch) || ((flags & FWRITE) && wrch)) {
/* device already open in one or both directions */ /*
* device already open in one or both directions that
* the opener wants; we can't handle this.
*/
pcm_unlock(d); pcm_unlock(d);
splx(s); splx(s);
return EBUSY; return EBUSY;
} }
/* if we get here, the open request is valid */ /*
* if we get here, the open request is valid- either:
* * we were previously not open
* * we were open for play xor record and the opener wants
* the non-open direction
*/
if (flags & FREAD) { if (flags & FREAD) {
/* open for read */ /* open for read */
if (devtype == SND_DEV_DSPREC) if (devtype == SND_DEV_DSPREC)