summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-09-08 18:16:24 +0000
committerMiles Bader <miles@gnu.org>1996-09-08 18:16:24 +0000
commitfb01130409c32f8e22fc684b282954be8cb06511 (patch)
treecb788a2b7d44a9f17ba4688f849f9c15a63732ae
parent6e1e3c2d591865e42f0e782692eb9d180292127f (diff)
Initial checkin
-rw-r--r--storeio/Makefile30
-rw-r--r--sutils/MAKEDEV.sh78
2 files changed, 108 insertions, 0 deletions
diff --git a/storeio/Makefile b/storeio/Makefile
new file mode 100644
index 00000000..8f79f672
--- /dev/null
+++ b/storeio/Makefile
@@ -0,0 +1,30 @@
+# Makefile for storeio
+#
+# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+dir := storeio
+makemode := server
+
+target = storeio
+SRCS = dev.c storeio.c open.c pager.c io.c
+LCLHDRS = dev.h open.h
+
+OBJS = $(SRCS:.c=.o)
+
+include ../Makeconf
+
+storeio: $(OBJS) ../libtrivfs/libtrivfs.a ../libpager/libpager.a ../libports/libports.a ../libfshelp/libfshelp.a ../libstore/libstore.a ../libthreads/libthreads.a ../libihash/libihash.a ../libshouldbeinlibc/libshouldbeinlibc.a
diff --git a/sutils/MAKEDEV.sh b/sutils/MAKEDEV.sh
new file mode 100644
index 00000000..88bef5d0
--- /dev/null
+++ b/sutils/MAKEDEV.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+#
+# Make standard devices
+#
+
+PATH=/bin
+
+function st {
+ NODE="$1"
+ OWNER="$2"
+ PERM="$3"
+ shift 3
+ settrans -cg "$NODE"
+ chown "$OWNER" "$NODE"
+ chmod "$PERM" "$NODE"
+ settrans "$NODE" "$@"
+}
+
+_CWD=${_CWD:-`pwd`}
+export _CWD
+
+for I; do
+ case "$I" in
+ std)
+ $0 console tty null zero fd time
+ ;;
+ console|tty[0-9][0-9a-f]|tty[0-9a-f]|com[0-9])
+ st $I root 600 /hurd/term $_CWD/$I device $I;;
+ null)
+ st $I root 666 /hurd/null;;
+ zero)
+ st $I root 666 /hurd/null -z;;
+ tty)
+ st $I root 666 /hurd/magic tty;;
+ fd)
+ st $I root 666 /hurd/magic fd
+ ln -f -s fd/0 stdin
+ ln -f -s fd/1 stdout
+ ln -f -s fd/2 stderr
+ ;;
+ time)
+ st $I root 666 /hurd/devport time ;;
+
+ # ptys
+ [pt]ty[pqPQ]?)
+ # Make one pty, both the master and slave halves
+ ID="`expr substr $I 4 99`"
+ st pty$ID root 640 /hurd/term $_CWD/pty$ID pty-master $_CWD/tty$ID
+ st tty$ID root 640 /hurd/term $_CWD/tty$ID pty-slave $_CWD/pty$ID
+ ;;
+ [pt]ty[pqPQ])
+ # Make a bunch of ptys
+ $0 ${I}0 ${I}1 ${I}2 ${I}3 ${I}4 ${I}5 ${I}6 ${I}7
+ $0 ${I}8 ${I}9 ${I}a ${I}b ${I}c ${I}d ${I}e ${I}f
+ ;;
+
+ fd*|mt*)
+ st $I root 640 /hurd/storeio -d $I
+ ;;
+
+ [hrs]d*)
+ case "$I" in
+ [a-z][a-z][0-9][a-z] | [a-z][a-z][0-9]s[1-9] | [a-z][a-z][0-9]s[1-9][a-z] | [a-z][a-z][0-9])
+ st $I root 640 /hurd/storeio -d $I
+ ;;
+ *)
+ echo 1>&2 $0: $I: Illegal device name: must supply a device number
+ exit 1
+ ;;
+ esac
+ ;;
+
+ *)
+ echo >&2 $0: $I: Unknown device
+ exit 1
+ ;;
+ esac
+done