strengthen mknod().

Submitted by:	bde
This commit is contained in:
jkh 1998-01-03 11:53:52 +00:00
parent 7ab71c4b6f
commit 2b0bc076df
2 changed files with 8 additions and 8 deletions

View File

@ -106,7 +106,7 @@
# perfmon CPU performance-monitoring counters
# pci PCI configuration-space access from user mode
#
# $Id: MAKEDEV,v 1.146 1997/12/29 09:45:23 jkh Exp $
# $Id: MAKEDEV,v 1.147 1998/01/02 22:16:15 jkh Exp $
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
@ -147,11 +147,11 @@ dkminor()
echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4))
}
# call mknod with rm -f first.
# Override mknod(2) to add extra handling to it.
mknod() {
rm -f "$1" || exit 1
/sbin/mknod $* || die 2 "/sbin/mknod $* failed"
chown root.wheel "$1"
/sbin/mknod "$@" || die 2 "/sbin/mknod $@ failed"
chown root.wheel "$1" || exit 1
}
# Convert the last character of a tty name to a minor number.

View File

@ -106,7 +106,7 @@
# perfmon CPU performance-monitoring counters
# pci PCI configuration-space access from user mode
#
# $Id: MAKEDEV,v 1.146 1997/12/29 09:45:23 jkh Exp $
# $Id: MAKEDEV,v 1.147 1998/01/02 22:16:15 jkh Exp $
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
@ -147,11 +147,11 @@ dkminor()
echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4))
}
# call mknod with rm -f first.
# Override mknod(2) to add extra handling to it.
mknod() {
rm -f "$1" || exit 1
/sbin/mknod $* || die 2 "/sbin/mknod $* failed"
chown root.wheel "$1"
/sbin/mknod "$@" || die 2 "/sbin/mknod $@ failed"
chown root.wheel "$1" || exit 1
}
# Convert the last character of a tty name to a minor number.