[hackers] [PATCH ubase] Remove mknod; it was imported into sbase

From: Michael Forney <mforney_AT_mforney.org>
Date: Sun, 1 Mar 2020 17:11:58 -0800

---
 Makefile |  2 --
 mknod.1  | 37 -------------------------------------
 mknod.c  | 45 ---------------------------------------------
 3 files changed, 84 deletions(-)
 delete mode 100644 mknod.1
 delete mode 100644 mknod.c
diff --git a/Makefile b/Makefile
index b526421..b072ef0 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -61,7 +61,6 @@ BIN = \
 	lsmod             \
 	lsusb             \
 	mesg              \
-	mknod             \
 	mkswap            \
 	mount             \
 	mountpoint        \
_AT_@ -102,7 +101,6 @@ MAN1 = \
 	id.1                \
 	login.1             \
 	mesg.1              \
-	mknod.1             \
 	mountpoint.1        \
 	pagesize.1          \
 	passwd.1            \
diff --git a/mknod.1 b/mknod.1
deleted file mode 100644
index 5437fbb..0000000
--- a/mknod.1
+++ /dev/null
_AT_@ -1,37 +0,0 @@
-.Dd February 2, 2015
-.Dt MKNOD 1
-.Os ubase
-.Sh NAME
-.Nm mknod
-.Nd create a special device file
-.Sh SYNOPSIS
-.Nm
-.Op Fl m Ar mode
-.Ar name
-.Ar type
-.Ar major
-.Ar minor
-.Sh DESCRIPTION
-.Nm
-creates a special device file named
-.Ar name
-with major number
-.Ar major ,
-and minor number
-.Ar minor .
-.Ar type
-specifies what kind of special file will be created and must be one of:
-.Bl -tag -width Ds
-.It Ar u | c
-A character device.
-.It Ar b
-A block device.
-.El
-.Sh OPTIONS
-.Bl -tag -width Ds
-.It Fl m
-Set the mode of the new file based on the octal value of
-.Ar mode .
-.El
-.Sh SEE ALSO
-.Xr mknod 2
diff --git a/mknod.c b/mknod.c
deleted file mode 100644
index 8de35c7..0000000
--- a/mknod.c
+++ /dev/null
_AT_@ -1,45 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "util.h"
-
-static void
-usage(void)
-{
-	eprintf("usage: %s [-m mode] name type major minor\n", argv0);
-}
-
-int
-main(int argc, char *argv[])
-{
-	mode_t type, mode = 0644;
-	dev_t dev;
-
-	ARGBEGIN {
-	case 'm':
-		mode = estrtol(EARGF(usage()), 8);
-		break;
-	default:
-		usage();
-	} ARGEND;
-
-	if (argc != 4)
-		usage();
-
-	if (strlen(argv[1]) != 1 || !strchr("ucb", argv[1][0]))
-		eprintf("mknod: '%s': invalid type\n", argv[1]);
-	type = (argv[1][0] == 'b') ? S_IFBLK : S_IFCHR;
-
-	dev = makedev(estrtol(argv[2], 0), estrtol(argv[3], 0));
-
-	if (mknod(argv[0], type|mode, dev) == -1)
-		eprintf("mknod: '%s':", argv[0]);
-	return 0;
-}
-- 
2.25.1
Received on Mon Mar 02 2020 - 02:11:58 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 02 2020 - 02:24:36 CET