diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-04-18 19:41:47 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-04-18 19:41:47 +0000 |
commit | 74d6df07a07867d6420f20d206153bc0ba26b8aa (patch) | |
tree | f361ec12046dd0d9b0b2b6a7218852b92207422d /usr.bin | |
parent | 4d9f93dd72e2e01f1a67a9921877781abbdba645 (diff) |
mkfifo has been merged into mknod
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mkfifo/Makefile | 5 | ||||
-rw-r--r-- | usr.bin/mkfifo/mkfifo.1 | 94 | ||||
-rw-r--r-- | usr.bin/mkfifo/mkfifo.c | 117 |
3 files changed, 0 insertions, 216 deletions
diff --git a/usr.bin/mkfifo/Makefile b/usr.bin/mkfifo/Makefile deleted file mode 100644 index ae91c610e1a..00000000000 --- a/usr.bin/mkfifo/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile,v 1.3 1997/09/21 11:50:04 deraadt Exp $ - -PROG= mkfifo - -.include <bsd.prog.mk> diff --git a/usr.bin/mkfifo/mkfifo.1 b/usr.bin/mkfifo/mkfifo.1 deleted file mode 100644 index 453abc94b1c..00000000000 --- a/usr.bin/mkfifo/mkfifo.1 +++ /dev/null @@ -1,94 +0,0 @@ -.\" $OpenBSD: mkfifo.1,v 1.6 1998/09/26 19:55:08 aaron Exp $ -.\" $NetBSD: mkfifo.1,v 1.4 1994/12/23 07:16:54 jtc Exp $ -.\" -.\" Copyright (c) 1990, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" This code is derived from software contributed to Berkeley by -.\" the Institute of Electrical and Electronics Engineers, Inc. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)mkfifo.1 8.2 (Berkeley) 1/5/94 -.\" -.Dd January 5, 1994 -.Dt MKFIFO 1 -.Os BSD 4.4 -.Sh NAME -.Nm mkfifo -.Nd make FIFOs -.Sh SYNOPSIS -.Nm mkfifo -.Op Fl m Ar mode -.Ar fifo_name ... -.Sh DESCRIPTION -.Nm mkfifo -creates the FIFOs requested, in the order specified, -using mode -.Li \&0666 -modified by the current -.Xr umask 2 . -.Pp -The options are as follows: -.Bl -tag -width Ds -.It Fl m Ar mode -Set the file permission bits of newly-created directories to -.Ar mode . -The mode is specified as in -.Xr chmod 1 . -In symbolic mode strings, the -.Dq + -and -.Dq - -operators are interpreted relative to an assumed initial mode of -.Dq a=rw . -.El -.Pp -.Nm mkfifo -requires write permission in the parent directory. -.Pp -The -.Nm mkfifo -utility exits 0 on success or >0 if an error occurred. -.Sh SEE ALSO -.Xr mkdir 1 , -.Xr rm 1 , -.Xr mkfifo 2 , -.Xr mknod 8 -.Sh STANDARDS -The -.Nm mkfifo -utility is expected to be -.St -p1003.2-92 -compliant. -.Sh HISTORY -The -.Nm -command appeared in -.Bx 4.4 . diff --git a/usr.bin/mkfifo/mkfifo.c b/usr.bin/mkfifo/mkfifo.c deleted file mode 100644 index 1f48645df49..00000000000 --- a/usr.bin/mkfifo/mkfifo.c +++ /dev/null @@ -1,117 +0,0 @@ -/* $OpenBSD: mkfifo.c,v 1.5 1998/09/26 09:04:43 deraadt Exp $ */ -/* $NetBSD: mkfifo.c,v 1.7 1994/12/23 07:16:56 jtc Exp $ */ - -/* - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef lint -static char copyright[] = -"@(#) Copyright (c) 1990, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -#if 0 -static char sccsid[] = "@(#)mkfifo.c 8.2 (Berkeley) 1/5/94"; -#endif -static char rcsid[] = "$OpenBSD: mkfifo.c,v 1.5 1998/09/26 09:04:43 deraadt Exp $"; -#endif /* not lint */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <locale.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> -#include <err.h> - -static void usage(); - -int -main(argc, argv) - int argc; - char *argv[]; -{ - int ch, exitval; - void * set; - mode_t mode; - - setlocale (LC_ALL, ""); - - /* The default mode is the value of the bitwise inclusive or of - S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, and S_IWOTH - modified by the file creation mask */ - mode = 0666 & ~umask(0); - - while ((ch = getopt(argc, argv, "m:")) != -1) - switch(ch) { - case 'm': - if (!(set = setmode(optarg))) { - errx(1, "invalid file mode."); - /* NOTREACHED */ - } - - /* - * In symbolic mode strings, the + and - operators are - * interpreted relative to an assumed initial mode of - * a=rw. - */ - mode = getmode (set, 0666); - free(set); - break; - case '?': - default: - usage(); - } - argc -= optind; - argv += optind; - if (argv[0] == NULL) - usage(); - - for (exitval = 0; *argv; ++argv) { - if (mkfifo(*argv, mode) < 0) { - warn("%s", *argv); - exitval = 1; - } - } - exit(exitval); -} - -void -usage() -{ - (void)fprintf(stderr, "usage: mkfifo [-m mode] fifoname ...\n"); - exit(1); -} |