Add TIOCPKT and TIOCSPTLCK to the Linuxolator.

We're very lucky, because the flags used by our TIOCPKT implementation
are the same as flags used by Linux. We can safely enable TIOCPKT,
assuming EXTPROC is not used.

TIOCSPTLCK is used by unlockpt(). Because we don't need unlockpt() in
our implementation, make this ioctl a no-op.

Approved by:	philip (mentor, implicit), rdivacky
Obtained from:	P4 (//depot/projects/mpsafetty/...)
This commit is contained in:
Ed Schouten 2008-07-23 17:47:44 +00:00
parent c71665a590
commit b377be43a5
2 changed files with 9 additions and 1 deletions

View File

@ -893,7 +893,10 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
break;
}
/* LINUX_TIOCPKT */
case LINUX_TIOCPKT:
args->cmd = TIOCPKT;
error = (ioctl(td, (struct ioctl_args *)args));
break;
case LINUX_FIONBIO:
args->cmd = FIONBIO;
@ -993,6 +996,10 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
sizeof(int));
break;
}
case LINUX_TIOCSPTLCK:
/* Our unlockpt() does nothing. */
error = 0;
break;
default:
error = ENOIOCTL;
break;

View File

@ -368,6 +368,7 @@
#define LINUX_TIOCCBRK 0x5428
#define LINUX_TIOCGPTN 0x5430
#define LINUX_TIOCSPTLCK 0x5431
#define LINUX_FIONCLEX 0x5450
#define LINUX_FIOCLEX 0x5451