summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-11-19 05:11:01 +0000
committerRoland McGrath <roland@gnu.org>1999-11-19 05:11:01 +0000
commitf3b3030d40001211bdc72d8005bafb6bdf9881d7 (patch)
tree9fe4c1fbaa8235c4c6c26c136826ad41351fb092 /utils
parentdaa03eecddd230fe6af0fbdadf66f05f5097beb6 (diff)
mount.sh replaced by mount.c
Diffstat (limited to 'utils')
-rw-r--r--utils/ChangeLog10
-rwxr-xr-xutils/mount.sh73
2 files changed, 10 insertions, 73 deletions
diff --git a/utils/ChangeLog b/utils/ChangeLog
index 1c7b4bfc..a29ec39a 100644
--- a/utils/ChangeLog
+++ b/utils/ChangeLog
@@ -1,3 +1,13 @@
+1999-11-19 Roland McGrath <roland@baalperazim.frob.com>
+
+ * mount.c: New file.
+ * mount.sh: File removed.
+ * Makefile (special-targets): Remove mount.
+ (SRCS): mount.sh -> mount.c
+ (mount): Add deps on ../sutils/fstab.o, ../sutils/clookup.o,
+ libfshelp and libports.
+ (../sutils/fstab.o ../sutils/clookup.o): Rule to build in ../sutils.
+
1999-11-18 Roland McGrath <roland@baalperazim.frob.com>
* vmstat.c (BADVAL): New macro.
diff --git a/utils/mount.sh b/utils/mount.sh
deleted file mode 100755
index 25ec0c94..00000000
--- a/utils/mount.sh
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-#
-# A simple version of mount for the hurd
-#
-
-usage="Usage: $0: [ -rnv | -o DEVOPTS | -t TYPE | -f FSTAB ] ( DEVICE NODE | DEVICE | NODE )"
-
-PATH=/bin
-
-default_type=ufs
-type=""
-fstab=/etc/fstab
-exec=true
-echo=false
-
-while :; do
- case $1 in
- -v) echo=true; margs="$margs -v"; shift;;
- -n) exec=false; margs="$margs -n"; shift;;
- -r) targs="$targs -r"; shift;;
- -t) case "$type" in
- ""|"$2") type="$2"; shift 2; margs="$margs -t $type";;
- *) echo 1>&2 $0: "$2": Filesystem type inconsistent with "$type"
- exit 7;;
- esac;;
- -f) fstab=$2; shift 2;;
- -o) targs="$targs $2"; shift 2;;
- -*) echo 1>&2 $0: $1: unknown flag; echo 1>&2 "$usage"; exit 1;;
- *) break;;
- esac
-done
-
-case "$targs" in ?*)
- # We embed quotes so that spaces are preserved in targs later on
- margs="$margs -o \"$targs\""
-esac
-
-case $# in
- 1)
- # Lookup the given single arg in /etc/fstab for the rest of the args
- args=`awk -f - $fstab <<END
-\\$1 == "$1" || \\$2 == "$1" {
- for (i = 4; i <= NF; i++)
- printf("%s ", \\$i);
- printf("-t %s %s %s", \\$3, \\$1, \\$2);
- exit(0);
-}
-END
-`
- case "$args" in
- "") echo 1>&2 $0: $1: not found in $fstab; exit 3;;
- *) eval $0 $margs $args;;
- esac
- ;;
-
- 2)
- # Do the mount, by putting an active translator on the node
-
- case "$type" in "") type="$default_type";; esac
-
- if [ ! -x /hurd/$type ]; then
- echo 1>&2 $0: $type: unknown filesystem type
- exit 1
- fi
-
- $echo && echo settrans -a $2 /hurd/$type $targs $1
- $exec && settrans -a $2 /hurd/$type $targs $1
- ;;
-
- *)
- echo 1>&2 "$usage"; exit 1
- ;;
-esac