From 671d87d340c8beb082d0f019dbf9aaf387d969cf Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 12 Aug 1999 03:57:56 +0000 Subject: [PATCH] patch for sync support from Paul Fulghum --- freebsd-3.0/kinstall.sh | 53 +++++++++++++++++++++++++++++++++++++- freebsd-3.0/patch.ttycom.h | 16 ++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 freebsd-3.0/patch.ttycom.h diff --git a/freebsd-3.0/kinstall.sh b/freebsd-3.0/kinstall.sh index ebe4c5e..7a44f95 100644 --- a/freebsd-3.0/kinstall.sh +++ b/freebsd-3.0/kinstall.sh @@ -7,7 +7,10 @@ # Most of the kernel files are already part of the kernel source # but, this updates them for synchronous HDLC operation # -# Paul Fulghum 19-Apr-99 +# Paul Fulghum paulkf@microgate.com August 11, 1999 +# +# 990911 - Added patch for ttycom.h that defines new IOCTL for sync support. +# KPATH=$(uname -v | sed 's/.*://') CONF=$(echo $KPATH | sed 's;.*compile/;;') @@ -42,6 +45,31 @@ for f in if_ppp.h if_ppp.c ppp_tty.c ; do fi done +# Patch files in /usr/src/sys/sys + +for f in ttycom.h ; do + dest=$SYS/sys/$f + patch=$SRC/patch.$f + if [ -f $dest ]; then + echo -n "Patching $dest..." + if patch -s -C -N $dest < $patch 2> /dev/null; then + patch -s -N $dest < $patch + echo "successful." + DOMAKE=yes + else + if patch -s -C -R $dest < $patch 2> /dev/null; then + echo "already applied." + else + echo "failed (incorrect version or already applied)." + fi + fi + else + echo "Warning, file $dest not found" + fi +done + +# Patch files in /usr/include/net + for f in if_ppp.h ; do dest=/usr/include/net/$f patch=$SRC/patch.$f @@ -63,6 +91,29 @@ for f in if_ppp.h ; do fi done +# Patch files in /usr/include/sys + +for f in ttycom.h ; do + dest=/usr/include/sys/$f + patch=$SRC/patch.$f + if [ -f $dest ]; then + echo -n "Patching $dest..." + if patch -s -C -N $dest < $patch 2> /dev/null; then + patch -s -N $dest < $patch + echo "successful." + DOMAKE=yes + else + if patch -s -C -R $dest < $patch 2> /dev/null; then + echo "already applied." + else + echo "failed (incorrect version or already applied)." + fi + fi + else + echo "Warning, file $dest not found" + fi +done + # Tell the user to add a pseudo-device line to the configuration file. if [ -f $CFILE ]; then diff --git a/freebsd-3.0/patch.ttycom.h b/freebsd-3.0/patch.ttycom.h new file mode 100644 index 0000000..c2fc7ba --- /dev/null +++ b/freebsd-3.0/patch.ttycom.h @@ -0,0 +1,16 @@ +--- ttycom.h Mon Jun 17 08:08:09 1996 ++++ ttycom.h.new Fri Apr 9 08:22:06 1999 +@@ -133,9 +133,13 @@ + #define TIOCDSIMICROCODE _IO('t', 85) /* download microcode to + * DSI Softmodem */ + ++#define TIOCRCVFRAME _IOW('t', 69, struct mbuf *) /* data frame received */ ++#define TIOCXMTFRAME _IOW('t', 68, struct mbuf *) /* data frame transmit */ ++ + #define TTYDISC 0 /* termios tty line discipline */ + #define TABLDISC 3 /* tablet discipline */ + #define SLIPDISC 4 /* serial IP discipline */ + #define PPPDISC 5 /* PPP discipline */ ++#define HDLCDISC 6 /* HDLC discipline */ + + #endif /* !_SYS_TTYCOM_H_ */ -- 2.39.2