From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 05:35:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5A42106566B; Thu, 14 Jan 2010 05:35:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B37108FC15; Thu, 14 Jan 2010 05:35:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0E5ZWlN038020; Thu, 14 Jan 2010 05:35:32 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0E5ZWCx038013; Thu, 14 Jan 2010 05:35:32 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001140535.o0E5ZWCx038013@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 Jan 2010 05:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202274 - in head: . include lib/libc/gen libexec/getty X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 05:35:32 -0000 Author: ed Date: Thu Jan 14 05:35:32 2010 New Revision: 202274 URL: http://svn.freebsd.org/changeset/base/202274 Log: Phase out ttyslot(3). The ttyslot() function was originally part for SUSv1, marked LEGACY in SUSv2 and removed later on. This function only makes sense when using utmp(5), because it was used to determine the offset of the record for the controlling TTY. It makes little sense to keep it here, because the new utmpx file format doesn't index based on TTY slots. Modified: head/ObsoleteFiles.inc head/include/unistd.h head/lib/libc/gen/Symbol.map head/lib/libc/gen/ttyname.3 head/lib/libc/gen/ttyslot.c head/libexec/getty/ttys.5 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Jan 14 02:48:39 2010 (r202273) +++ head/ObsoleteFiles.inc Thu Jan 14 05:35:32 2010 (r202274) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100114: removal of ttyslot(3) +OLD_FILES+=usr/share/man/man3/ttyslot.3.gz # 20100113: remove utmp.h, replace it by utmpx.h OLD_FILES+=usr/share/man/man3/login.3.gz OLD_FILES+=usr/share/man/man3/logout.3.gz Modified: head/include/unistd.h ============================================================================== --- head/include/unistd.h Thu Jan 14 02:48:39 2010 (r202273) +++ head/include/unistd.h Thu Jan 14 05:35:32 2010 (r202274) @@ -574,7 +574,6 @@ int swapon(const char *); int swapoff(const char *); int syscall(int, ...); off_t __syscall(quad_t, ...); -int ttyslot(void); int undelete(const char *); int unwhiteout(const char *); void *valloc(size_t); /* obsoleted by malloc() */ Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Thu Jan 14 02:48:39 2010 (r202273) +++ head/lib/libc/gen/Symbol.map Thu Jan 14 05:35:32 2010 (r202274) @@ -272,7 +272,6 @@ FBSD_1.0 { openlog; closelog; setlogmask; - ttyslot; ttyname_r; ttyname; timezone; Modified: head/lib/libc/gen/ttyname.3 ============================================================================== --- head/lib/libc/gen/ttyname.3 Thu Jan 14 02:48:39 2010 (r202273) +++ head/lib/libc/gen/ttyname.3 Thu Jan 14 05:35:32 2010 (r202274) @@ -34,8 +34,7 @@ .Sh NAME .Nm ttyname , .Nm ttyname_r , -.Nm isatty , -.Nm ttyslot +.Nm isatty .Nd get name of associated terminal (tty) from file descriptor .Sh LIBRARY .Lb libc @@ -47,8 +46,6 @@ .Fn ttyname_r "int fd" "char *buf" "size_t len" .Ft int .Fn isatty "int fd" -.Ft int -.Fn ttyslot void .Sh DESCRIPTION These functions operate on the system file descriptors for terminal type devices. @@ -89,13 +86,6 @@ The .Fn ttyname_r function takes a buffer and length as arguments to avoid this problem. -.Pp -The -.Fn ttyslot -function -fetches the current process' control terminal number from the -.Xr ttys 5 -file entry. .Sh RETURN VALUES The .Fn ttyname @@ -110,12 +100,6 @@ The .Fn ttyname_r function returns 0 if successful. Otherwise an error number is returned. -.Pp -The -.Fn ttyslot -function -returns the unit number of the device file if found; otherwise -the value zero is returned. .Sh FILES .Bl -tag -width ".Pa /etc/ttys" -compact .It Pa /dev/\(** @@ -142,10 +126,9 @@ is smaller than the length of the string .Xr ttys 5 .Sh HISTORY The -.Fn isatty , -.Fn ttyname , +.Fn isatty and -.Fn ttyslot +.Fn ttyname functions appeared in .At v7 . Modified: head/lib/libc/gen/ttyslot.c ============================================================================== --- head/lib/libc/gen/ttyslot.c Thu Jan 14 02:48:39 2010 (r202273) +++ head/lib/libc/gen/ttyslot.c Thu Jan 14 05:35:32 2010 (r202274) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include int -ttyslot() +__ttyslot(void) { struct ttyent *ttyp; int slot; @@ -63,3 +63,5 @@ ttyslot() endttyent(); return(0); } + +__sym_compat(ttyslot, __ttyslot, FBSD_1.0); Modified: head/libexec/getty/ttys.5 ============================================================================== --- head/libexec/getty/ttys.5 Thu Jan 14 02:48:39 2010 (r202273) +++ head/libexec/getty/ttys.5 Thu Jan 14 05:35:32 2010 (r202274) @@ -158,7 +158,6 @@ ttyp1 none network off group=pty .Sh SEE ALSO .Xr login 1 , .Xr getttyent 3 , -.Xr ttyslot 3 , .Xr gettytab 5 , .Xr login.conf 5 , .Xr termcap 5 ,