BSD 4_4_Lite1 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Tue, 30 Nov 1993 00:31:02 +0000 (16:31 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Tue, 30 Nov 1993 00:31:02 +0000 (16:31 -0800)
Work on file usr/src/contrib/nvi.1.14/PORT/clib/fchmod.c

Synthesized-from: CSRG/cd2/4.4BSD-Lite1

usr/src/contrib/nvi.1.14/PORT/clib/fchmod.c [new file with mode: 0644]

diff --git a/usr/src/contrib/nvi.1.14/PORT/clib/fchmod.c b/usr/src/contrib/nvi.1.14/PORT/clib/fchmod.c
new file mode 100644 (file)
index 0000000..887786c
--- /dev/null
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <compat.h>
+
+int
+fchmod(fd, mode)
+       int fd;
+       u_int mode;
+{
+       char *tty;
+
+       /* Find the tty. */
+       if ((tty = ttyname(fd)) == NULL)
+               return (-1);
+
+       return (chmod(tty, mode));
+}