Check if we control device. Else we will go to panic cause we don't have

properly initialized dev_t structure at open.
This commit is contained in:
Roman Kurakin 2004-06-09 17:58:51 +00:00
parent ef92aa117e
commit daac3fffc8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130277

View file

@ -2140,7 +2140,7 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
return 0;
}
if (c->mode == M_ASYNC && d->tty) {
if (c->mode == M_ASYNC && !IF_CUNIT(dev) && d->tty) {
#if __FreeBSD_version >= 502113
error = ttyioctl (dev, cmd, data, flag, td);
ttyldoptim (d->tty);