summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:33 +0100
committerKarel Zak2006-12-07 00:25:33 +0100
commit726f69e29ca9d4842f3acb20fffd2466fda62c09 (patch)
treeabbc1b6e9bfb0dfe32e81a83648e261ccb2d5a5f /sys-utils
parentImported from util-linux-2.2 tarball. (diff)
downloadkernel-qcow2-util-linux-726f69e29ca9d4842f3acb20fffd2466fda62c09.tar.gz
kernel-qcow2-util-linux-726f69e29ca9d4842f3acb20fffd2466fda62c09.tar.xz
kernel-qcow2-util-linux-726f69e29ca9d4842f3acb20fffd2466fda62c09.zip
Imported from util-linux-2.5 tarball.
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/MAKEDEV486
-rw-r--r--sys-utils/MAKEDEV.8147
-rw-r--r--sys-utils/Makefile42
-rw-r--r--sys-utils/README.MAKEDEV6
-rw-r--r--sys-utils/clock.88
-rw-r--r--sys-utils/ctrlaltdel.84
-rw-r--r--sys-utils/cytune.8181
-rw-r--r--sys-utils/cytune.c424
-rw-r--r--sys-utils/ipcs.c1
-rw-r--r--sys-utils/sync.S17
-rw-r--r--sys-utils/tunelp.82
-rw-r--r--sys-utils/tunelp.c13
-rw-r--r--sys-utils/update_state.835
-rw-r--r--sys-utils/update_state.sh41
14 files changed, 648 insertions, 759 deletions
diff --git a/sys-utils/MAKEDEV b/sys-utils/MAKEDEV
deleted file mode 100644
index 6326edd43..000000000
--- a/sys-utils/MAKEDEV
+++ /dev/null
@@ -1,486 +0,0 @@
-#! /bin/sh -
-
-RCSID='MAKEDEV,v 1.1.1.1 1995/02/22 19:09:11 faith Exp'
-
-#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
-# Customisation:
-# The devices fall into various classes. This section contains the mapping
-# from a class name into a group name and permission.
-# You will almost certainly need to edit the group name to match your
-# system, and you may change the permissions to suit your preference. These
-# lines _must_ be of the format "user group perm".
-
- public=" root system 666"
- system=" root system 660"
- kmem=" root kmem 660"
- tty=" root tty 666"
- cons=" root tty 622" # 622 for console?
-dialout=" root uucp 660"
- mouse=" root system 666"
-printer=" root daemon 660"
- floppy=" root floppy 660"
- disk=" root disk 660"
- scsi=" root system 600"
- cdrom=" root disk 660"
- tape=" root disk 660"
- audio=" root system 666"
- ibcs2=" root system 666"
-scanner=" root system 666"
-
-#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
-
-procfs=/proc
-
-opt_v=
-opt_d=
-opt_n=
-
-while [ $# -ge 1 ]
-do
- case $1 in
- --) shift; break ;;
- -v) shift; opt_v=1 ;;
- -d) shift; opt_d=1 ;;
- -n) shift; opt_n=1; opt_v=1 ;;
- -V) shift; opt_V=1 ;;
- -*) echo "$0: unknown flag \"$1\"" >&2; exit 1 ;;
- *) break ;;
- esac
-done
-
-if [ "$opt_V" ]
-then
- echo "$RCSID"
- exit 0
-fi
-
-opts="${opt_n:+-n} ${opt_v:+-v} ${opt_d:+-d}"
-
-makedev () { # usage: makedev name [bcu] major minor owner group mode
- if [ "$opt_v" ]
- then if [ "$opt_d" ]
- then echo "delete $1"
- else echo "create $1 $2 $3 $4 $5:$6 $7"
- fi
- fi
- if [ ! "$opt_n" ]
- then if [ "$opt_d" ]
- then
- rm -f $1
- else
- mknod $1- $2 $3 $4 &&
- chown $5:$6 $1- &&
- chmod $7 $1- &&
- mv $1- $1
- fi
- fi
-}
-symlink () { # usage: symlink name target
- if [ "$opt_v" ]
- then if [ "$opt_d" ]
- then echo "delete $1"
- else echo "create $1 -> $2"
- fi
- fi
- [ ! "$opt_n" ] && rm -f $1 &&
- [ ! "$opt_d" ] && ln -s $2 $1
-}
-
-devices=
-if [ ! -f $procfs/devices ]
-then
- echo "$0: warning: can't read $procfs/devices" >&2
-else
- exec 3<$procfs/devices
- while read major device <&3
- do
- case "$major" in
- Character|Block|'')
- ;;
- *)
- eval "major_$device=$major"
- devices="$devices $device"
- ;;
- esac
- done
- exec 3<&-
-fi
-
-Major () {
- device=$2
- if [ "$opt_d" ]
- then
- echo -1 # don't care
- else
- eval echo \${major_$1:-\${device:?\"unknown major number for $1\"}}
- fi
-}
-
-cvt () {
- while [ $# -ne 0 ]
- do
- case "$1" in
- mem|tty|ttyp|cua|cub) ;;
- hd) echo hda hdb ;;
- xd) echo xda xdb ;;
- fd) echo fd0 fd1 ;;
- lp) echo lp0 lp1 lp2 ;;
- mt) echo ftape ;;
- loop) echo loop ;;
- ibcs2) echo ibcs2 ;;
- tpqic02) echo qic ;;
- sound) echo audio ;;
- logiscan) echo logiscan ;;
- ac4096) echo ac4096 ;;
- idecd) echo idecd ;;
- hw) echo helloworld ;;
- sbpcd | sbpcd[123]) echo $1 ;;
- Joystick) echo js ;;
- apm_bios) echo apm ;;
- dcf) echo dcf ;;
- pcmcia) ;; # taken care of by its own driver
- ttyC) echo cyclades ;;
- *) echo "$0: don't know what \"$1\" is" >&2 ;;
- esac
- shift
- done
-}
-
-for arg
-do
- case $arg in
- generic)
- $0 $opts std
- $0 $opts fd0 fd1
- $0 $opts hda hdb
- $0 $opts xda xdb
- $0 $opts sda sdb
- $0 $opts ptyp ptyq ptyr ptys
- $0 $opts console tty1 tty2 tty3 tty4 tty5 tty6 tty7 tty8
- $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
- $0 $opts busmice
- $0 $opts lp0 lp1 lp2
- $0 $opts par0 par1 par2
- $0 $opts fd
- ;;
- local)
- $0.local $opts
- ;;
- std)
- makedev mem c 1 1 $kmem
- makedev kmem c 1 2 $kmem
- makedev null c 1 3 $public
- makedev port c 1 4 $kmem
- makedev zero c 1 5 $public
- symlink core $procfs/kcore
- makedev full c 1 7 $public
- makedev ram b 1 1 $disk
- makedev tty c 5 0 $tty
- ;;
- console|tty0)
- makedev $arg c 4 0 $cons
- ;;
- tty[1-9]|tty[1-5][0-9]|tty[6][0-3])
- line=`expr $arg : "tty\(.*\)"`
- makedev tty$line c 4 $line $tty
- ;;
- ttyS[0-9]|ttyS[1-5][0-9]|ttyS[6][0-3])
- line=`expr $arg : "ttyS\(.*\)"`
- minor=`expr 64 + $line`
- makedev ttyS$line c 4 $minor $tty
- makedev cua$line c 5 $minor $dialout
- ;;
- pty[p-s])
- # Currently limited to 64 master/slave pairs.
- bank=`expr $arg : "pty\(.\)"`
- base=`expr \( pqrs : ".*$bank" - 1 \) \* 16`
- for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f
- do
- j=`expr 0123456789abcdef : ".*$i" - 1`
- makedev pty$bank$i c 4 `expr 128 + $base + $j` $tty
- makedev tty$bank$i c 4 `expr 192 + $base + $j` $tty
- done
- ;;
- cyclades)
- major1=`Major ttyC` || continue
- major2=`Major cub` || continue
- for i in 0 1 2 3 4 5 6 7 # 8 9 10 11 12 13 14 15
- do
- makedev ttyC$i c $major1 `expr 32 + $i` $tty
- makedev cub$i c $major2 `expr 32 + $i` $dialout
- done
- ;;
- par[0-2])
- major=`Major lp 6` || continue
- port=`expr $arg : "par\(.\)"`
- makedev $arg c $major $port $printer
- ;;
- lp[0-2])
- major=`Major lp 6` || continue
- port=`expr $arg : "lp\(.\)"`
- makedev $arg c $major $port $printer
- ;;
- busmice)
- major=`Major mouse 10` || continue
- makedev logibm c $major 0 $mouse
- makedev psaux c $major 1 $mouse
- makedev inportbm c $major 2 $mouse
- makedev atibm c $major 3 $mouse
- # makedev sejin c $major 4 $mouse
- ;;
- js)
- major=`Major Joystick` || continue
- makedev js0 c $major 0 $mouse
- makedev js1 c $major 1 $mouse
- ;;
- fd[0-4])
- major=`Major fd 2` || continue
- unit=`expr $arg : "fd\(.\)"`
- makedev fd${unit} b $major $unit $floppy
- makedev fd${unit}d360 b $major `expr $unit + 4` $floppy
- makedev fd${unit}h1200 b $major `expr $unit + 8` $floppy
- makedev fd${unit}D360 b $major `expr $unit + 12` $floppy
- symlink fd${unit}H360 fd${unit}D360
- makedev fd${unit}D720 b $major `expr $unit + 16` $floppy
- symlink fd${unit}H720 fd${unit}D720
- makedev fd${unit}h360 b $major `expr $unit + 20` $floppy
- makedev fd${unit}h720 b $major `expr $unit + 24` $floppy
- makedev fd${unit}H1440 b $major `expr $unit + 28` $floppy
- makedev fd${unit}E2880 b $major `expr $unit + 32` $floppy
- makedev fd${unit}CompaQ b $major `expr $unit + 36` $floppy
-
- makedev fd${unit}h1440 b $major `expr $unit + 40` $floppy
- makedev fd${unit}H1680 b $major `expr $unit + 44` $floppy
- makedev fd${unit}h410 b $major `expr $unit + 48` $floppy
- makedev fd${unit}H820 b $major `expr $unit + 52` $floppy
- makedev fd${unit}h1476 b $major `expr $unit + 56` $floppy
- makedev fd${unit}H1722 b $major `expr $unit + 60` $floppy
- makedev fd${unit}h420 b $major `expr $unit + 64` $floppy
- makedev fd${unit}H830 b $major `expr $unit + 68` $floppy
- makedev fd${unit}h1494 b $major `expr $unit + 72` $floppy
- makedev fd${unit}H1743 b $major `expr $unit + 76` $floppy
- ;;
- hd[a-d])
- major=`Major hd 3` || continue
- unit=`expr $arg : "hd\(.\)"`
- base=`expr \( abcd : ".*$unit" - 1 \) \* 64`
- makedev hd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15 16
- do
- makedev hd$unit$part b $major `expr $base + $part` $disk
- done
- ;;
- hd1[a-d])
- unit=`expr $arg : "hd1\(.\)"`
- base=`expr \( abcd : ".*$unit" - 1 \) \* 64`
- makedev hd1$unit b 22 $base $disk
- for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15 16
- do
- makedev hd1$unit$part b 22 `expr $base + $part` $disk
- done
- ;;
- xd[a-d])
- major=`Major xd 13` || continue
- unit=`expr $arg : "xd\(.\)"`
- base=`expr \( abcd : ".*$unit" - 1 \) \* 64`
- makedev xd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15 16
- do
- makedev xd$unit$part b $major `expr $base + $part` $disk
- done
- ;;
- sd[a-h])
- major=`Major sd 8` || continue
- unit=`expr $arg : "sd\(.\)"`
- base=`expr \( abcdefgh : ".*$unit" - 1 \) \* 16`
- makedev sd$unit b $major $base $disk
- for part in 1 2 3 4 5 6 7 8 # 9 10 11 12 13 14 15
- do
- minor=`expr $base + $part`
- makedev sd$unit$part b $major $minor $disk
- done
- ;;
- loop)
- major=`Major loop` || continue
- for part in 0 1 2 3 4 5 6 7
- do
- makedev loop$part b $major $part $disk
- done
- ;;
- st[0-7])
- major=`Major st 9`
- unit=`expr $arg : "st\(.\)"`
- makedev st$unit c $major $unit $tape
- makedev nst$unit c $major `expr 128 + $unit` $tape
- ;;
- qic)
- major=`Major tpqic02 12`
- makedev rmt8 c $major 6 $tape
- makedev rmt16 c $major 8 $tape
- makedev tape-d c $major 136 $tape
- makedev tape-reset c $major 255 $tape
- ;;
- ftape)
- major=`Major mt 27` || continue
- for unit in 0 1 2 3
- do
- makedev rft$unit c $major $unit $tape
- makedev nrft$unit c $major `expr $unit + 4` $tape
- done
- symlink ftape rft0
- symlink nftape nrft0
- ;;
- scd[0-7])
- major=`Major sr 11` || continue
- unit=`expr $arg : "scd\(.\)"`
- makedev scd$unit b $major $unit $cdrom
- ;;
- sonycd)
- major=`Major cdu31a` || continue
- makedev $arg b $major 0 $cdrom
- ;;
- mcd)
- major=`Major mcd 23` || continue
- makedev $arg b $major 0 $cdrom
- ;;
- cdu535)
- makedev $arg b 24 0 $cdrom
- ;;
- lmscd)
- makedev $arg b 24 0 $cdrom
- ;;
- sbpcd|sbpcd[123])
- major=`Major $arg` || continue
- base=`expr ${arg}0 : "sbpcd\(.\)"`
- for minor in 0 1 2 3
- do
- unit=`expr substr 0123456789abcdef \( $base \* 4 + $minor + 1 \) 1`
- makedev spbcd$unit b $major $minor $cdrom
- done
- [ $arg = sbpcd ] && symlink $arg ${arg}0
- ;;
- idecd)
- major=`Major idecd` || continue
- makedev $arg c $major 0 $cdrom
- ;;
- logiscan)
- major=`Major logiscan` || continue
- makedev $arg c $major 0 $scanner
- ;;
- m105scan)
- major=`Major m105` || continue
- makedev $arg c $major 0 $scanner
- ;;
- ac4096)
- major=`Major ac4096` || continue
- makedev $arg c $major 0 $scanner
- ;;
- audio)
- major=`Major sound 14`
- makedev mixer c $major 0 $audio
- makedev sequencer c $major 1 $audio
- makedev midi00 c $major 2 $audio
- makedev dsp c $major 3 $audio
- makedev audio c $major 4 $audio
- makedev sndstat c $major 6 $audio
-# makedev sequencer2 c $major 8 $audio
- makedev mixer1 c $major 16 $audio
-# makedev patmgr0 c $major 17 $audio
- makedev midi01 c $major 18 $audio
- makedev dsp1 c $major 19 $audio
- makedev audio1 c $major 20 $audio
-# makedev patmgr1 c $major 33 $audio
- makedev midi02 c $major 34 $audio
- makedev midi03 c $major 50 $audio
- ;;
- pcaudio)
- major=`Major pcsp` || continue
- makedev pcmixer c $major 0 $audio
- makedev pcsp c $major 3 $audio
- makedev pcaudio c $major 4 $audio
- ;;
- sg)
- major=`Major sg 21`
- for unit in a b c d e f g h
- do
- minor=`expr abcdefgh : ".*$unit" - 1`
- makedev $arg$unit c $major $minor $scsi
- done
- ;;
- fd)
- # not really devices, we use the /proc filesystem
- symlink fd $procfs/self/fd
- symlink stdin fd/0
- symlink stdout fd/1
- symlink stderr fd/2
- ;;
- ibcs2)
- major=`Major ibcs2` || continue
- makedev socksys c $major 0 $ibcs2
- symlink nfsd socksys
- makedev spx c $major 1 $ibcs2
- symlink X0R null
- ;;
- apm)
- major=`Major apm_bios` || continue
- makedev $arg c $major 0 $system
- ;;
- dcf)
- major=`Major dcf` || continue
- makedev $arg c $major 0 $system
- ;;
- helloworld)
- major=`Major hw` || continue
- makedev helloworld c $major 0 $public
- ;;
- update)
- if [ ! "$devices" ]
- then
- echo "$0: don't appear to have any devices" >&2
- continue
- fi
- if [ "$opt_d" ]
- then
- echo "$0: can't delete an update" >&2
- continue
- fi
- create=
- delete=
- devs="$devices"
- if [ -f DEVICES ]
- then
- exec 3<DEVICES
- while read device major <&3
- do
- eval now=\$major_$device
- if [ "$now" = "" ]
- then
- delete="$delete `cvt $device`"
- continue
- elif [ "$now" != $major ]
- then
- create="$create "`cvt $device`
- fi
- devs=`expr "$devs" : "\(.*\) $device"``expr "$devs" : ".* $device\(.*\)"`
- done
- exec 3<&-
- fi
- create="$create "`cvt $devs`
- $0 $opts -d $delete
- $0 $opts $create
- [ "$opt_n" ] && continue
- for device in $devices
- do
- if [ "`cvt $device`" ]
- then
- eval echo $device \$major_$device
- fi
- done > DEVICES
- ;;
- *)
- echo "$0: don't know how to make device \"$arg\"" >&2
- ;;
- esac
-done
-
-exit 0
diff --git a/sys-utils/MAKEDEV.8 b/sys-utils/MAKEDEV.8
deleted file mode 100644
index fe0c3645e..000000000
--- a/sys-utils/MAKEDEV.8
+++ /dev/null
@@ -1,147 +0,0 @@
-.\" MAKEDEV.8,v 1.1.1.1 1995/02/22 19:09:12 faith Exp
-.TH MAKEDEV 8 "14th August 1994" Linux "Linux Programmer's Manual"
-.SH NAME
-MAKEDEV \- create devices
-.SH SYNOPSIS
-.B "cd dev; ./MAKEDEV [ -n ] [ -v ] update"
-.br
-.BI "cd dev; ./MAKEDEV [ -n ] [ -v ]" "device"
-.SH DESCRIPTION
-.B MAKEDEV
-is a script that will create the devices in \fC/dev\fP used to interface
-with drivers in the kernel.
-.PP
-Note that programs giving the error \(*QENOENT: No such file or
-directory\(*U normally means that the device file is missing, whereas
-\(*QENODEV: No such device\(*U normally means the kernel does not have the
-driver configured or loaded.
-.SH OPTIONS
-.TP
-.B \-V
-Print out version (actually RCS version information) and exit.
-.TP
-.B \-n
-Do not actually update the devices, just print the actions that would be
-performed.
-.TP
-.B \-d
-Delete the devices. The main use for this flag is by
-.I MAKEDEV
-itself.
-.TP
-.B \-v
-Be verbose. Print out the actions as they are performed. This is the
-same output as produced by
-.BR \-n .
-.SH CUSTOMISATION
-Since there is no standardisation in what names are used for system users
-and groups, it is possible that you may need to modify
-.B MAKEDEV
-to reflect your site's settings. Near the top of the file is a mapping
-from device type to user, group and permissions (e.g. all CD-ROM devices
-are set from the \fC$cdrom\fP variable). If you wish to change the
-defaults, this is the section to edit.
-.SH DEVICES
-.TP
-.B General Options
-.TP
-.B update
-This only works on kernels which have \fC/proc/interrupts\fP (introduced
-during 1.1.x). This file is scanned to see what devices are currently
-configured into the kernel, and this is compared with the previous
-settings stored in the file called \fCDEVICES\fP.
-Devices which are new since then or have a different major number are
-created, and those which are no longer configured are deleted.
-.TP
-.B generic
-Create a generic subset of devices.
-.TP
-.B
-std
-Standard devices.
-.TP
-.B local
-.TP
-.B Virtual Terminals
-.TP
-.B console
-Also known as tty0.
-.TP
-.B tty{0..63}
-Virtual consoles
-.TP
-.B Serial Devices
-.TP
-.I ttyS{0..63}
-serial ports and corresponding dialout device
-.TP
-.I cyclades
-Dial-in and dial-out devices for the cyclades intelligent I/O serial card.
-.TP
-.B Pseudo Terminals
-.TP
-.I pty[p-s]
-banks of of master and slave pseudo terminals
-.TP
-.B Parallel Ports
-.TP
-.I par[0-3] lp[0-3]
-parallel ports
-.TP
-.B Bus Mice
-.TP
-.I busmice
-The various bus mice devices.
-.TP
-.B Joystick Devices
-.TP
-.I js
-Joystick. Creates \fCjs0\fP and \fCjs1\fP.
-.TP
-.B Disks Devices
-.TP
-.I fd[0-4]
-floppy disks
-.TP
-.I hd[a-d]
-AT hard disks (1st controller)
-.TP
-.I hd1[a-d]
-2nd AT controller hard disks
-.TP
-.I xd[a-d]
-XT hard disks
-.TP
-.I sd[a-i]
-SCSI hard disks
-.TP
-.I loop
-Loopback disk devices
-.TP
-.B Tape Devices
-.TP
-.I st[0-7]
-SCSI tapes
-.TP
-.I qic
-QIC-80 tapes
-.TP
-.I ftape
-floppy driver tapes (QIC-117)
-.TP
-.B CDROM Devices
-.TP
-.I scd[0-7]
-SCSI CD players
-.TP
-.I sonycd
-Sony CDU-31A CD player
-.TP
-.I mcd
-Mitsumi CD player
-.TP
-.I cdu535
-Sony CDU-535 CD player
-.TP
-.I lmscd
-LMS/Philips CD player (nee \ No newline at end of file
diff --git a/sys-utils/Makefile b/sys-utils/Makefile
index a584f16d1..fc5afd4eb 100644
--- a/sys-utils/Makefile
+++ b/sys-utils/Makefile
@@ -1,6 +1,6 @@
# Makefile -- Makefile for util-linux Linux utilities
# Created: Sat Dec 26 20:09:40 1992
-# Revised: Sat Feb 11 17:52:09 1995 by faith@cs.unc.edu
+# Revised: Sat Oct 7 19:24:39 1995 by r.faith@ieee.org
# Copyright 1992, 1993, 1994, 1995 Rickard E. Faith (faith@cs.unc.edu)
#
@@ -10,46 +10,33 @@ include ../MCONFIG
MAN1= arch.1 readprofile.1
-MAN8= MAKEDEV.8 chroot.8 clock.8 ctrlaltdel.8 dmesg.8 ipcrm.8 \
- ipcs.8 kbdrate.8 lpcntl.8 ramsize.8 rdev.8 renice.8 \
+MAN8= chroot.8 clock.8 ctrlaltdel.8 cytune.8 dmesg.8 \
+ ipcrm.8 ipcs.8 kbdrate.8 ramsize.8 rdev.8 renice.8 \
rootflags.8 setserial.8 setsid.8 swapdev.8 sync.8 tunelp.8 \
- update_state.8 vidmode.8
+ vidmode.8
# Where to put binaries?
# See the "install" rule for the links. . .
-DEV= MAKEDEV
-
-SBIN= clock kbdrate sln
+SBIN= clock ctrlaltdel kbdrate sln
BIN= arch dmesg setserial sync
-USRSBIN= chroot ctrlaltdel update_state
+USRSBIN= chroot
-USRBIN= ipcrm ipcs lpcntl rdev renice readprofile setsid tunelp
+USRBIN= cytune ipcrm ipcs rdev renice readprofile setsid tunelp
# Where to put datebase files?
USRINFO= ipc.info
-SCRIPTS= reset update_state
-
all: $(SBIN) $(BIN) $(USRSBIN) $(USRBIN)
sln: sln.c
$(CC) -static $(CFLAGS) $(LDFLAGS) $< -o $@
sync: sync.S
- /lib/cpp sync.S > sync.s
- as -o sync.o sync.s
- ld -s -N -e _main sync.o -o sync
- -rm sync.s
-
-%.o: %.c
- $(CC) -c $(CFLAGS) $< -o $@
-
-$(SCRIPTS):
- cp $@.sh $@
+ $(CC) -nostdlib $(LDFLAGS) $< -o $@
# Rules for everything else
@@ -60,25 +47,22 @@ ctrlaltdel: ctrlaltdel.o
ipcrm: ipcrm.o
ipcs: ipcs.o
kbdrate: kbdrate.o
-lpcntl: lpcntl.o
rdev: rdev.o
renice: renice.o
readprofile: readprofile.o
setserial: setserial.o
setsid: setsid.o
-update_state: update_state.sh
install: all
- $(INSTALLDIR) $(DEVDIR) $(SBINDIR) $(BINDIR) $(USRSBINDIR) $(USRBINDIR)
- $(INSTALLBIN) $(DEV) $(DEVDIR)
+ $(INSTALLDIR) $(SBINDIR) $(BINDIR) $(USRSBINDIR) $(USRBINDIR)
$(INSTALLBIN) $(SBIN) $(SBINDIR)
$(INSTALLBIN) $(BIN) $(BINDIR)
$(INSTALLBIN) $(USRSBIN) $(USRSBINDIR)
$(INSTALLBIN) $(USRBIN) $(USRBINDIR)
- (cd $(RDEVDIR); ln -sf rdev swapdev)
- (cd $(RDEVDIR); ln -sf rdev ramsize)
- (cd $(RDEVDIR); ln -sf rdev vidmode)
- (cd $(RDEVDIR); ln -sf rdev rootflags)
+ (cd $(USRBINDIR); ln -sf rdev swapdev)
+ (cd $(USRBINDIR); ln -sf rdev ramsize)
+ (cd $(USRBINDIR); ln -sf rdev vidmode)
+ (cd $(USRBINDIR); ln -sf rdev rootflags)
$(INSTALLDIR) $(MAN1DIR) $(MAN8DIR) $(INFODIR)
$(INSTALLMAN) $(MAN1) $(MAN1DIR)
$(INSTALLMAN) $(MAN8) $(MAN8DIR)
diff --git a/sys-utils/README.MAKEDEV b/sys-utils/README.MAKEDEV
index 0cba83284..02652b2b6 100644
--- a/sys-utils/README.MAKEDEV
+++ b/sys-utils/README.MAKEDEV
@@ -1,4 +1,4 @@
-README.MAKEDEV,v 1.1.1.1 1995/02/22 19:09:12 faith Exp
+$Id: README.MAKEDEV,v 2.2 1995/06/04 16:32:02 faith Exp $
Here is the original comment taken from the MAKEDEV script. One day,
I'll do this properly.
@@ -17,6 +17,8 @@ If you are aware of any glaring omissions or errors, please let me know.
Also, if you are a developer who wants your devices supported by MAKEDEV,
let me know.
-Thanks to Ian Jackson for the original help and encouragement.
+Thanks go to many people. Ian Jackson for the original help and
+encouragement, to Matthias Urlichs for plugging "MAKEDEV update", and
+to the many others that have bought errors and omissions to my attention.
Nick Holloway <Nick.Holloway@alfie.demon.co.uk>
diff --git a/sys-utils/clock.8 b/sys-utils/clock.8
index f4dd83ade..1f6139ae4 100644
--- a/sys-utils/clock.8
+++ b/sys-utils/clock.8
@@ -4,13 +4,13 @@
.SH NAME
clock \- manipulate the CMOS clock
.SH SYNOPSIS
-.B "/etc/clock [ -u ] -r"
+.B "/sbin/clock [ -u ] -r"
.br
-.B "/etc/clock [ -u ] -w"
+.B "/sbin/clock [ -u ] -w"
.br
-.B "/etc/clock [ -u ] -s"
+.B "/sbin/clock [ -u ] -s"
.br
-.B "/etc/clock [ -u ] -a"
+.B "/sbin/clock [ -u ] -a"
.SH DESCRIPTION
.B clock
manipulates the CMOS clock in variaous ways, allowing it to be read or
diff --git a/sys-utils/ctrlaltdel.8 b/sys-utils/ctrlaltdel.8
index 488f37c07..026818ed4 100644
--- a/sys-utils/ctrlaltdel.8
+++ b/sys-utils/ctrlaltdel.8
@@ -1,10 +1,10 @@
.\" Copyright 1992, 1993 Rickard E. Faith (faith@cs.unc.edu)
.\" May be distributed under the GNU General Public License
-.TH CTRLALTDEL 8 "25 October 1993" "Linux 0.99" "Linux Programmer's Manual"
+.TH CTRLALTDEL 8 "25 October 1993" "Linux 1.2" "Linux Programmer's Manual"
.SH NAME
ctrlaltdel \- set the function of the Ctrl-Alt-Del combination
.SH SYNOPSIS
-.B "ctrlaltdel hard|soft"
+.BR "ctrlaltdel hard" " | " soft
.SH DESCRIPTION
Based on examination of the
.I linux/kernel/sys.c
diff --git a/sys-utils/cytune.8 b/sys-utils/cytune.8
new file mode 100644
index 000000000..772915b69
--- /dev/null
+++ b/sys-utils/cytune.8
@@ -0,0 +1,181 @@
+.\" cytune.8 --
+.\" Created: Sat Mar 4 17:44:53 1995 by faith@cs.unc.edu
+.\" Update: Sat Mar 4 18:22:24 1995 by faith@cs.unc.edu
+.\" Update: Sun Mar 5 06:40:12 1995 by njs@scifi.emi.net
+.\" Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
+.\"
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date. The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein. The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" "
+.TH CYTUNE 8 " 4 Mar 1995" "" "Linux Programmer's Manual"
+.SH NAME
+cytune \- Tune Cyclades driver parameters
+.SH SYNOPSIS
+.BI "cytune [-q [-i " interval "]] ([-s " value "]|[-S " value "]) [-g|G] "
+.BI ([-t " timeout" ]|[-T " timeout" ]) " tty" " [" tty " ...]"
+.SH DESCRIPTION
+.B cytune
+queries and modifies the interruption threshold for the Cyclades driver.
+Each serial line on a Cyclades card has a 12-byte FIFO for input (and
+another 12-byte FIFO for output). The "threshold" specifies how many input
+characters must be present in the FIFO before an interruption is raised.
+When a Cyclades tty is opened, this threshold is set to a default value
+based on baud rate:
+.sp
+.RS
+ Baud Threshold
+.sp
+50-4800 10
+.br
+9600 8
+.br
+19200 4
+.br
+38400 2
+.br
+57600-150000 1
+.RE
+.PP
+If the threshold is set too low, the large number of interruptions can load
+the machine and decrease overall system throughput. If the threshold is set too high, the
+FIFO buffer can overflow, and characters will be lost. Slower machines,
+however, may not be able to deal with the interrupt load, and will require
+that the threshold be adjusted upwards.
+.PP
+If the cyclades driver was compiled with
+.B ENABLE_MONITORING
+defined, the cytune command can be used with the
+.B \-q
+option to report interrupts over the monitoring interval and
+characters transferred over the monitoring interval. It will also report
+the state of the FIFO. The maximum number of characters in the FIFO when
+an interrupt occurred, the instantaneous count of characters in the FIFO,
+and how many characters are now in the FIFO are reported. This output might
+look like this:
+.sp
+.RS
+/dev/cubC0: 830 ints, 9130 chars; fifo: 11 threshold, 11 max, 11 now
+.br
+ 166.259866 interrupts/second, 1828.858521 characters/second
+.RE
+.PP
+This output indicates that for this monitoring period, the interrupts were
+always being handled within one character time, because
+.B max
+never rose above
+.BR threshold .
+This is good, and you can probably run this way, provided that a large
+number of samples come out this way. You will lose characters if you
+overrun the FIFO, as the Cyclades hardware does not seem to support
+the RTS RS-232 signal line for hardware flow control from the
+DCE to the DTE.
+.pp
+cytune will in query mode will produce a summary report when ended with
+a SIGINT or when the threshold or timeout is changed.
+.PP
+There may be a responsiveness vs. throughput tradeoff. The Cyclades card,
+at the higher speeds, is capable of putting a very high interrupt load on the
+system. This will reduce the amount of CPU time available for other tasks
+on your system. However, the time it takes to respond to a single character
+may be increased if you increase the threshold. This might be noticed by
+monitoring
+.BR ping (8)
+times on a SLIP link controlled by a Cyclades card. If your SLIP link is
+generally used for interactive work such as
+.BR telnet (1),
+you may want to leave the threshold low, so that characters are responded
+to as quickly as possible. If your SLIP link is generally used for file
+transfer, WWW, and the like, setting the FIFO to a high value is likely to
+reduce the load on your system while not significantly affecting
+throughput. Alternatively, see the
+.B \-t
+or
+.B \-T
+options to adjust the time that the cyclades waits before flushing its
+buffer. Units are 5ms.
+.PP
+If you are running a mouse on a Cyclades port, it is likely that you would
+want to maintain the threshold and timeout at a low value.
+.PP
+.SH OPTIONS
+.TP
+.BI \-s " value"
+Set the current threshold to
+.I value
+characters. Note that if the
+.I tty
+is not being held open by another process, the threshold will be reset on
+the next open. Only values between 1 and 12, inclusive, are permitted.
+.TP
+.BI \-t " value"
+Set the current flush timeout to
+.I value
+units. Note that if the
+.I tty
+is not being held open by another process, the threshold will be reset on
+the next open. Only values between 0 and 255, inclusive, are permitted.
+Setting
+.I value
+to zero forces the default, currently 0x20 (160ms), but soon to be 0x02
+(10ms). Units are 5 ms.
+.TP
+.B \-g
+Get the current threshold and timeout.
+.TP
+.BI \-T " value"
+Set the default flush timeout to
+.I value
+units. When the
+.I tty
+is next opened, this value will be used instead of the default. If
+.I value
+is zero, then the the value will default to 0x20 (160ms), soon to be 0x02
+(10ms).
+.TP
+.B \-G
+Get the default threshold and flush timeout values.
+.TP
+.B \-q
+Gather statistics about the
+.IR tty .
+The results are only valid if the Cyclades driver has been compiled with
+.B ENABLE_MONITORING
+defined. This is probably not the default.
+.TP
+.BI \-i " interval"
+Statistics will be gathered every
+.I interval
+seconds.
+.SH BUGS
+If you run two copies of cytune at the same time to report statistics
+about the same port, the 'ints', 'chars', and 'max' value will be reset
+and not reported
+correctly.
+.BR cytune (8)
+should prevent this, but does not.
+.SH AUTHOR
+Nick Simicich (njs@scifi.emi.net), with modifications by Rik Faith
+(faith@cs.unc.edu)
+.SH FILES
+.I /dev/ttyC[0-8]
+.br
+.I /dev/cubC[0-8]
+.SH "SEE ALSO"
+.BR setserial (8)
diff --git a/sys-utils/cytune.c b/sys-utils/cytune.c
new file mode 100644
index 000000000..32a27006b
--- /dev/null
+++ b/sys-utils/cytune.c
@@ -0,0 +1,424 @@
+/* cytune.c -- Tune Cyclades driver
+ *
+ * Copyright 1995 Nick Simicich (njs@scifi.emi.net)
+ *
+ * Modifications by Rik Faith (faith@cs.unc.edu)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the Nick Simicich
+ * 4. Neither the name of the Nick Simicich nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY NICK SIMICICH AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL NICK SIMICICH OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/serial.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <linux/tty.h>
+#include <termios.h>
+#include <linux/tqueue.h>
+#include <linux/cyclades.h>
+#include <signal.h>
+
+#if 0
+#ifndef XMIT
+# include <linux/version.h>
+# if LINUX_VERSION_CODE > 66056
+# define XMIT
+# endif
+#endif
+#endif
+ /* Until it gets put in the kernel,
+ toggle by hand. */
+#undef XMIT
+
+struct cyclades_control {
+ struct cyclades_monitor c;
+ int cfile;
+ int maxmax;
+ double maxtran;
+ double maxxmit;
+ unsigned long threshold_value;
+ unsigned long timeout_value;
+};
+struct cyclades_control *cmon;
+int cmon_index;
+
+#define mvtime(tvpto, tvpfrom) (((tvpto)->tv_sec = (tvpfrom)->tv_sec),(tvpto)->tv_usec = (tvpfrom)->tv_usec)
+
+
+inline double dtime(struct timeval * tvpnew, struct timeval * tvpold) {
+ double diff;
+ diff = (double)tvpnew->tv_sec - (double)tvpold->tv_sec;
+ diff += ((double)tvpnew->tv_usec - (double)tvpold->tv_usec)/1000000;
+ return diff;
+}
+
+static int global_argc, global_optind;
+static char ***global_argv;
+
+void summary(int signal) {
+ struct cyclades_control *cc;
+
+ int argc, optind;
+ char **argv;
+
+ int i,j;
+
+ argc = global_argc;
+ argv = *global_argv;
+ optind = global_optind;
+
+ if (signal > 0) {
+ for(i = optind; i < argc; i ++) {
+ j = i - optind;
+ cc = &cmon[cmon_index];
+ fprintf(stderr, "File %s, For threshold value %lu, Maximum characters "
+ "in fifo were %d,\nand the maximum transfer rate in "
+ "characters/second was %f\n",
+ argv[i],
+ cc->threshold_value,
+ cc->maxmax,
+ cc->maxtran);
+ }
+
+ exit(0);
+ }
+ cc = &cmon[cmon_index];
+ if (cc->threshold_value > 0 && signal != -1) {
+ fprintf(stderr, "File %s, For threshold value %lu and timrout value %lu,"
+ " Maximum characters "
+ "in fifo were %d,\nand the maximum transfer rate in "
+ "characters/second was %f\n",
+ argv[cmon_index+optind],
+ cc->threshold_value,
+ cc->timeout_value,
+ cc->maxmax,
+ cc->maxtran);
+ }
+ cc->maxmax = 0;
+ cc->maxtran = 0.0;
+ cc->threshold_value = 0;
+ cc->timeout_value = 0;
+}
+
+static int query = 0;
+static int interval = 1;
+
+static int set = 0;
+static int set_val = -1;
+static int get = 0;
+
+static int set_def = 0;
+static int set_def_val = -1;
+static int get_def = 0;
+
+static int set_time = 0;
+static int set_time_val = -1;
+
+static int set_def_time = 0;
+static int set_def_time_val = -1;
+
+
+int main(int argc, char *argv[]) {
+
+ struct timeval lasttime, thistime;
+ struct timezone tz = {0,DST_NONE};
+ double diff;
+ int errflg = 0;
+ int file;
+ int numfiles;
+ struct cyclades_monitor cywork;
+
+ int i;
+ extern char *optarg;
+ extern int optind;
+ unsigned long threshold_value;
+ unsigned long timeout_value;
+ double xfer_rate;
+#ifdef XMIT
+ double xmit_rate;
+#endif
+
+ global_argc = argc; /* For signal routine. */
+ global_argv = &argv; /* For signal routine. */
+
+ while (EOF != (i = getopt(argc, argv,
+ "qs:S:t:T:gGi:"))) {
+ switch (i) {
+ case 'q':
+ query = 1;
+ break;
+ case 'i':
+ interval = atoi(optarg);
+ if(interval <= 0) {
+ fprintf(stderr, "Invalid interval value: %s\n",optarg);
+ errflg ++;
+ }
+ break;
+ case 's':
+ ++set;
+ set_val = atoi(optarg);
+ if(set_val <= 0 || set_val > 12) {
+ fprintf(stderr, "Invalid set value: %s\n",optarg);
+ errflg ++;
+ }
+ break;
+ case 'S':
+ ++set_def;
+ set_def_val = atoi(optarg);
+ if(set_def_val < 0 || set_def_val > 12) {
+ fprintf(stderr, "Invalid default value: %s\n",optarg);
+ errflg ++;
+ }
+ break;
+ case 't':
+ ++set_time;
+ set_time_val = atoi(optarg);
+ if(set_time_val <= 0 || set_time_val > 255) {
+ fprintf(stderr, "Invalid set time value: %s\n",optarg);
+ errflg ++;
+ }
+ break;
+ case 'T':
+ ++set_def_time;
+ set_def_time_val = atoi(optarg);
+ if(set_def_time_val < 0 || set_def_time_val > 255) {
+ fprintf(stderr, "Invalid default time value: %s\n",optarg);
+ errflg ++;
+ }
+ break;
+ case 'g': ++get; break;
+ case 'G': ++get_def; break;
+ default:
+ errflg ++;
+ }
+ }
+ numfiles = argc - optind;
+ if(errflg || (numfiles == 0)
+ || (!query && !set && !set_def &&
+ !get && !get_def && !set_time && !set_def_time) ||
+ (set && set_def) || (set_time && set_def_time) ||
+ (get && get_def)) {
+ fprintf(stderr,
+ "Usage: %s [-q [-i interval]]"
+ " ([-s value]|[-S value]) ([-t value]|[-T value])"
+ " [-g|-G] file [file...]\n",
+ argv[0]);
+ exit(1);
+ }
+
+ global_optind = optind; /* For signal routine. */
+
+ if (set || set_def) {
+ for(i = optind;i < argc;i ++) {
+ file = open(argv[i],O_RDONLY);
+ if(file == -1) {
+ fprintf(stderr, "Can't open %s: %s\n",argv[i],strerror(errno));
+ exit(1);
+ }
+ if(ioctl(file,
+ set ? CYSETTHRESH : CYSETDEFTHRESH,
+ set ? set_val : set_def_val)) {
+ fprintf(stderr, "Can't set %s to threshold %d: %s\n",
+ argv[i],set?set_val:set_def_val,strerror(errno));
+ exit(1);
+ }
+ }
+ }
+ if (set_time || set_def_time) {
+ for(i = optind;i < argc;i ++) {
+ file = open(argv[i],O_RDONLY);
+ if(file == -1) {
+ fprintf(stderr, "Can't open %s: %s\n",argv[i],strerror(errno));
+ exit(1);
+ }
+ if(ioctl(file,
+ set_time ? CYSETTIMEOUT : CYSETDEFTIMEOUT,
+ set_time ? set_time_val : set_def_time_val)) {
+ fprintf(stderr, "Can't set %s to time threshold %d: %s\n",
+ argv[i],set_time?set_time_val:set_def_time_val,strerror(errno));
+ exit(1);
+ }
+ }
+ }
+
+ if (get || get_def) {
+ for(i = optind;i < argc;i ++) {
+ file = open(argv[i],O_RDONLY);
+ if(file == -1) {
+ fprintf(stderr, "Can't open %s: %s\n",argv[i],strerror(errno));
+ exit(1);
+ }
+ if(ioctl(file, get ? CYGETTHRESH : CYGETDEFTHRESH, &threshold_value)) {
+ fprintf(stderr, "Can't get threshold for %s: %s\n",
+ argv[i],strerror(errno));
+ exit(1);
+ }
+ if(ioctl(file, get ? CYGETTIMEOUT : CYGETDEFTIMEOUT, &timeout_value)) {
+ fprintf(stderr, "Can't get timeout for %s: %s\n",
+ argv[i],strerror(errno));
+ exit(1);
+ }
+ printf("%s: %ld %s threshold and %ld %s timeout\n",
+ argv[i], threshold_value,
+ get?"current":"default",
+ timeout_value,
+ get?"current":"default");
+ }
+ }
+
+ if(!query) return 0; /* must have been something earlier */
+
+ /* query stuff after this line */
+
+ cmon = (struct cyclades_control *) malloc(sizeof (struct cyclades_control)
+ * numfiles);
+ if(!cmon) {
+ perror("malloc failed");
+ exit(1);
+ }
+ if(signal(SIGINT, summary)||
+ signal(SIGQUIT, summary)||
+ signal(SIGTERM, summary)) {
+ perror("Can't set signal handler");
+ exit(1);
+ }
+ if(gettimeofday(&lasttime,&tz)) {
+ perror("gettimeofday failed");
+ exit(1);
+ }
+ for(i = optind; i < argc; i ++) {
+ cmon_index = i - optind;
+ cmon[cmon_index].cfile = open(argv[i], O_RDONLY);
+ if(-1 == cmon[cmon_index].cfile) {
+ fprintf(stderr, "Can't open %s: %s\n",argv[i],strerror(errno));
+ exit(1);
+ }
+ if(ioctl(cmon[cmon_index].cfile, CYGETMON, &cmon[cmon_index].c)) {
+ fprintf(stderr, "Can't issue CYGETMON on %s: %s\n",
+ argv[i],strerror(errno));
+ exit(1);
+ }
+ summary(-1);
+ if(ioctl(cmon[cmon_index].cfile, CYGETTHRESH, &threshold_value)) {
+ fprintf(stderr, "Can't get threshold for %s: %s\n",
+ argv[i],strerror(errno));
+ exit(1);
+ }
+ if(ioctl(cmon[cmon_index].cfile, CYGETTIMEOUT, &timeout_value)) {
+ fprintf(stderr, "Can't get timeout for %s: %s\n",
+ argv[i],strerror(errno));
+ exit(1);
+ }
+ }
+ while(1) {
+ sleep(interval);
+
+ if(gettimeofday(&thistime,&tz)) {
+ perror("gettimeofday failed");
+ exit(1);
+ }
+ diff = dtime(&thistime, &lasttime);
+ mvtime(&lasttime, &thistime);
+
+ for(i = optind; i < argc; i ++) {
+ cmon_index = i - optind;
+ if(ioctl(cmon[cmon_index].cfile, CYGETMON, &cywork)) {
+ fprintf(stderr, "Can't issue CYGETMON on %s: %s\n",
+ argv[i],strerror(errno));
+ exit(1);
+ }
+ if(ioctl(cmon[cmon_index].cfile, CYGETTHRESH, &threshold_value)) {
+ fprintf(stderr, "Can't get threshold for %s: %s\n",
+ argv[i],strerror(errno));
+ exit(1);
+ }
+ if(ioctl(cmon[cmon_index].cfile, CYGETTIMEOUT, &timeout_value)) {
+ fprintf(stderr, "Can't get timeout for %s: %s\n",
+ argv[i],strerror(errno));
+ exit(1);
+ }
+
+ xfer_rate = cywork.char_count/diff;
+#ifdef XMIT
+ xmit_rate = cywork.send_count/diff;
+#endif
+
+ if(threshold_value != cmon[cmon_index].threshold_value ||
+ timeout_value != cmon[cmon_index].timeout_value) {
+ summary(-2);
+ /* Note that the summary must come before the setting of */
+ /* threshold_value */
+ cmon[cmon_index].threshold_value = threshold_value;
+ cmon[cmon_index].timeout_value = timeout_value;
+ } else {
+ /* Don't record this first cycle after change */
+ if(xfer_rate > cmon[cmon_index].maxtran)
+ cmon[cmon_index].maxtran = xfer_rate;
+#ifdef XMIT
+ if(xmit_rate > cmon[cmon_index].maxxmit)
+ cmon[cmon_index].maxxmit = xmit_rate;
+#endif
+ if(cywork.char_max > cmon[cmon_index].maxmax)
+ cmon[cmon_index].maxmax = cywork.char_max;
+ }
+
+#ifdef XMIT
+ printf("%s: %lu ints, %lu/%lu chars; "
+ "fifo: %lu thresh, %lu tmout, "
+ "%lu max, %lu now\n",
+ argv[i],
+ cywork.int_count,cywork.char_count,cywork.send_count,
+ threshold_value,timeout_value,
+ cywork.char_max,cywork.char_last);
+ printf(" %f int/sec; %f rec, %f send (char/sec)\n",
+ cywork.int_count/diff,
+ xfer_rate,
+ xmit_rate);
+#else
+ printf("%s: %lu ints, %lu chars; "
+ "fifo: %lu thresh, %lu tmout, "
+ "%lu max, %lu now\n",
+ argv[i],
+ cywork.int_count,cywork.char_count,
+ threshold_value,timeout_value,
+ cywork.char_max,cywork.char_last);
+ printf(" %f int/sec; %f rec (char/sec)\n",
+ cywork.int_count/diff,
+ xfer_rate);
+#endif
+ memcpy(&cmon[cmon_index].c, &cywork, sizeof (struct cyclades_monitor));
+ }
+ }
+
+ return 0;
+}
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 8e7f9c609..12df2261a 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -13,6 +13,7 @@ entry. */
#include <pwd.h>
#include <grp.h>
#define __KERNEL__
+#include <linux/linkage.h>
#include <sys/sem.h>
#include <sys/msg.h>
#include <sys/shm.h>
diff --git a/sys-utils/sync.S b/sys-utils/sync.S
index 2fa8f5662..5b7fd82b2 100644
--- a/sys-utils/sync.S
+++ b/sys-utils/sync.S
@@ -1,19 +1,22 @@
/* File:
* sync.S
* Compile:
- * /lib/cpp sync.S > sync.s
- * as -o sync.o sync.s
- * ld -s -N -e _main sync.o -o sync
+ * gcc -nostdlib sync.S -o sync
* Author:
* Nick Holloway, with thanks to James Bonfield
+ * Modified for ELF by Michael Shields
+ * Rik Faith added __ASSEMBLY__ for gcc 2.5.8
* Last Changed:
- * September 1993.
+ * 1995-07-04
*/
-# include <sys/syscall.h>
+#include <sys/syscall.h>
+#ifndef __ASSEMBLY__
+#define __ASSEMBLY__
+#endif
+#include <linux/linkage.h>
.text
- .globl _main
-_main:
+ENTRY(_start)
movl $(SYS_sync),%eax /* sync () */
int $0x80
movl $(SYS_exit),%eax /* exit ( 0 ) */
diff --git a/sys-utils/tunelp.8 b/sys-utils/tunelp.8
index 559118450..bff567626 100644
--- a/sys-utils/tunelp.8
+++ b/sys-utils/tunelp.8
@@ -2,7 +2,7 @@
.\" It may be distributed under the GNU Public License, version 2, or
.\" any higher version. See section COPYING of the GNU Public license
.\" for conditions under which this file may be redistributed.
-.\" tunelp.8,v 1.1.1.1 1995/02/22 19:09:12 faith Exp
+.\" $Id: tunelp.8,v 1.5 1995/03/12 01:34:24 faith Exp $
.TH tunelp 8 "26 August 1992" "Cohesive Systems" "Linux Programmer's Manual"
.SH NAME
tunelp \- set various parameters for the lp device
diff --git a/sys-utils/tunelp.c b/sys-utils/tunelp.c
index 9005b172d..a854b46b1 100644
--- a/sys-utils/tunelp.c
+++ b/sys-utils/tunelp.c
@@ -6,10 +6,13 @@
* for information on distribution conditions. *
\****************************************************************************/
-/* tunelp.c,v 1.1.1.1 1995/02/22 19:09:12 faith Exp
- * tunelp.c,v
- * Revision 1.1.1.1 1995/02/22 19:09:12 faith
- * Imported sources
+/* $Id: tunelp.c,v 1.6 1995/06/04 01:47:11 faith Exp $
+ * $Log: tunelp.c,v $
+ * Revision 1.6 1995/06/04 01:47:11 faith
+ * Changes for util-linux-2.4
+ *
+ * Revision 1.5 1995/03/12 01:29:50 faith
+ * util-linux-2.1
*
* Revision 1.5 1995/01/13 10:33:43 johnsonm
* Chris's changes for new ioctl numbers and backwards compatibility
@@ -195,7 +198,7 @@ int main (int argc, char ** argv) {
}
/* Allow for binaries compiled under a new kernel to work on the old ones */
- if (LPGETIRQ >= 0x0600 && ioctl(fd, LPGETIRQ) < 0 && errno == EINVAL)
+ if (LPGETIRQ >= 0x0600 && ioctl(fd, LPGETIRQ, &irq) < 0 && errno == EINVAL)
offset = 0x0600; /* We don't understand the new ioctls */
cmds = cmdst;
diff --git a/sys-utils/update_state.8 b/sys-utils/update_state.8
deleted file mode 100644
index 1013843e6..000000000
--- a/sys-utils/update_state.8
+++ /dev/null
@@ -1,35 +0,0 @@
-.\" Copyright 1994 Rickard E. Faith (faith@cs.unc.edu)
-.\" May be distributed under the GNU General Public License
-.\" "
-.TH update_state 8 "8 July 1994" "Linux 1.0" "Linux Programmer's Manual"
-.SH NAME
-update_state \- update system state
-.SH SYNOPSIS
-.BR update_state
-.SH DESCRIPTION
-.B update_state
-updates a bunch of system state. It takes a long time to execute, and
-would be suitable for execution in a cron job.
-
-Currently,
-.B update_state
-performs the following functions: updates the locate database (in
-.IR /usr/lib/locate ), updates the whatis database (in
-.IR /usr/man ", " /usr/local/man ", " /usr/X386/man ", and "
-.IR /usr/interviews/man ),
-and updates the TeX ls-R cache file (in
-.IR /usr/lib/texmf ).
-.SH BUGS
-The script expects things to be where the FSSTND says they are.
-example, if you have
-.BR makewhatis (8)
-in
-.IR /usr/lib ,
-where it would be traditionally, then you lose, because it should be in
-.IR /usr/bin .
-.SH "SEE ALSO"
-.BR cron(8),
-.BR find(1),
-.BR locate(1),
-.SH AUTHOR
-Rik Faith (faith@cs.unc.edu)
diff --git a/sys-utils/update_state.sh b/sys-utils/update_state.sh
deleted file mode 100644
index f318d08a1..000000000
--- a/sys-utils/update_state.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-if test "`whoami`" != "root"; then
- echo "This script must be executed by root"
- exit 1
-fi
-
-if test -x /usr/lib/locate/updatedb; then
- echo "WARNING: The /usr/lib/locate/find.codes file may violate the"
- echo " privacy of your users. Please consider making it"
- echo " readable only by root."
- echo ""
- echo "Updating locate database"
-
- /usr/lib/locate/updatedb
-fi
-
-if test -d /usr/lib/texmf; then
- echo "Building ls-R cache file for TeX"
- /bin/ls -LR /usr/lib/texmf > /tmp/ls-R.$$
- if test -f /usr/lib/texmf/ls-R; then
- cp /usr/lib/texmf/ls-R /usr/lib/texmf/ls-R.old
- fi
- mv /tmp/ls-R.$$ /usr/lib/texmf/ls-R
-fi
-
-if test -x /usr/bin/makewhatis; then
- for i in /usr/man /usr/local/man /usr/X386/man /usr/interviews/man; do
- if test -d $i; then
- echo "Building whatis database in $i"
- /usr/bin/makewhatis $i
- fi
- done
-fi
-
-if test -x /usr/bin/mandb; then
- echo "Updating manpage database"
- /usr/bin/mandb
-fi
-
-exit 0