Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share Take a stab at making SVR4_MAKEDEV more flexible towar...
details: https://anonhg.NetBSD.org/src/rev/13d436a5c965
branches: trunk
changeset: 472041:13d436a5c965
user: kleink <kleink%NetBSD.org@localhost>
date: Mon Apr 19 14:46:27 1999 +0000
description:
Take a stab at making SVR4_MAKEDEV more flexible towards multiple architectures.
diffstat:
share/examples/emul/svr4/etc/SVR4_MAKEDEV | 36 ++++++++++++++++++++++--------
share/man/man8/compat_svr4.8 | 13 +++++++++-
2 files changed, 37 insertions(+), 12 deletions(-)
diffs (144 lines):
diff -r f3f1d0f38a0d -r 13d436a5c965 share/examples/emul/svr4/etc/SVR4_MAKEDEV
--- a/share/examples/emul/svr4/etc/SVR4_MAKEDEV Mon Apr 19 14:43:46 1999 +0000
+++ b/share/examples/emul/svr4/etc/SVR4_MAKEDEV Mon Apr 19 14:46:27 1999 +0000
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $NetBSD: SVR4_MAKEDEV,v 1.4 1999/04/06 02:51:49 tv Exp $
+# $NetBSD: SVR4_MAKEDEV,v 1.5 1999/04/19 14:46:27 kleink Exp $
#
# Copyright (c) 1995 Christos Zoulas
# All rights reserved.
@@ -42,8 +42,18 @@
# wabi Windows emulation; /dev/null for now
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:/usr/etc
+MACHINE=${MACHINE:-`/usr/bin/uname -m`}
umask 77
+case $MACHINE in
+i386) major=43;;
+sparc) major=43;;
+*)
+ echo $MACHINE: unsupported machine >&2
+ exit 1
+ ;;
+esac
+
for i
do
@@ -59,7 +69,7 @@
ptmx)
rm -f $i
- mknod $i c 43 10
+ mknod $i c $major 10
chown bin.bin $i
chmod 666 $i
;;
@@ -88,7 +98,7 @@
tcp)
rm -f $i
- mknod $i c 43 35
+ mknod $i c $major 35
chown bin.bin $i
chmod 666 $i
;;
@@ -96,35 +106,35 @@
udp)
rm -f $i
- mknod $i c 43 36
+ mknod $i c $major 36
chown bin.bin $i
chmod 666 $i
;;
rawip)
rm -f $i
- mknod $i c 43 37
+ mknod $i c $major 37
chown bin.bin $i
chmod 666 $i
;;
ticlts)
rm -f $i
- mknod $i c 43 38
+ mknod $i c $major 38
chown bin.bin $i
chmod 666 $i
;;
ticotsord)
rm -f $i
- mknod $i c 43 39
+ mknod $i c $major 39
chown bin.bin $i
chmod 666 $i
;;
ticots)
rm -f $i
- mknod $i c 43 40
+ mknod $i c $major 40
chown bin.bin $i
chmod 666 $i
;;
@@ -132,13 +142,19 @@
wabi)
rm -f $i
- mknod $i c 3 2 # /dev/null
+ case $MACHINE in
+ sparc)
+ mknod $i c 3 2;; # /dev/null
+ i386)
+ mknod $i c 2 2;; # /dev/null
+ esac
chown bin.bin $i
chmod 666 $i
;;
*)
- echo $i: unknown device
+ echo $i: unknown device 2>&1
+ exit 1
;;
esac
done
diff -r f3f1d0f38a0d -r 13d436a5c965 share/man/man8/compat_svr4.8
--- a/share/man/man8/compat_svr4.8 Mon Apr 19 14:43:46 1999 +0000
+++ b/share/man/man8/compat_svr4.8 Mon Apr 19 14:46:27 1999 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: compat_svr4.8,v 1.13 1999/03/17 20:31:19 garbled Exp $
+.\" $NetBSD: compat_svr4.8,v 1.14 1999/04/19 14:46:27 kleink Exp $
.\"
.\" Copyright (c) 1996 Christos Zoulas
.\" All rights reserved.
@@ -31,7 +31,7 @@
.\"
.\" Stolen from compat_linux.8,v 1.2 1995/10/16 20:17:59 fvdl
.\"
-.Dd July 6, 1996
+.Dd April 19, 1999
.Dt COMPAT_SVR4 8
.Os
.Sh NAME
@@ -146,6 +146,15 @@
.br
.It (me@netbsd) cd /emul/svr4/dev; sh SVR4_MAKEDEV all
.El
+.Pp
+As the major number allocated for emulation of SVR4 devices may vary between
+.Nx
+platforms, the SVR4_MAKEDEV script utilizes the
+.Xr uname 1
+command to determine the architecture the devices nodes are being created for;
+this can be overridden by setting the
+.Ev MACHINE
+environment variable accordingly.
.El
.Pp
An alternative method is to mount a whole SVR4 partition in /emul/svr4
Home |
Main Index |
Thread Index |
Old Index