diff options
author | Ed Schouten <ed@FreeBSD.org> | 2010-01-17 15:43:14 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2010-01-17 15:43:14 +0000 |
commit | 79a7dbf11112e9705259f37a08ca5ee4a3cf6488 (patch) | |
tree | e428b634407137ed78707403256e0d00a6256387 | |
parent | 4dcc55a36389e96bcfddd75a25ea5fb91eb787c7 (diff) |
Notes
-rw-r--r-- | lib/libc/gen/ttyslot.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/libc/gen/ttyslot.c b/lib/libc/gen/ttyslot.c index b2fac7c0aef4f..1de0837e937a7 100644 --- a/lib/libc/gen/ttyslot.c +++ b/lib/libc/gen/ttyslot.c @@ -33,35 +33,11 @@ static char sccsid[] = "@(#)ttyslot.c 8.1 (Berkeley) 6/4/93"; #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <paths.h> -#include <ttyent.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> - int __ttyslot(void) { - struct ttyent *ttyp; - int slot; - int cnt; - char *name; - setttyent(); - for (cnt = 0; cnt < 3; ++cnt) - if ( (name = ttyname(cnt)) ) { - if (strncmp(name, _PATH_DEV, sizeof _PATH_DEV - 1) != 0) - break; - name += sizeof _PATH_DEV - 1; - for (slot = 1; (ttyp = getttyent()); ++slot) - if (!strcmp(ttyp->ty_name, name)) { - endttyent(); - return(slot); - } - break; - } - endttyent(); - return(0); + return (0); } __sym_compat(ttyslot, __ttyslot, FBSD_1.0); |