wrk@abvax.abnet.com (William R. King) (04/27/87)
Here is a patch to acucntrl.c to make it work with DMZ32's. It's basically just a cut and paste of the DMF32 code, but it nice to have things handed to you once in a while. I've been using this for about 2 months now with no problems. *** /tmp/,RCSt1002522 Mon Apr 27 15:37:17 1987 --- /tmp/,RCSt2002522 Mon Apr 27 15:37:18 1987 *************** *** 1,5 **** #ifndef lint ! static char sccsid[] = "@(#)acucntrl.c 5.8 (Berkeley) 2/12/86"; #endif /* acucntrl - turn around tty line between dialin and dialout --- 1,6 ---- #ifndef lint ! /* static char sccsid[] = "@(#)acucntrl.c 5.8 (Berkeley) 2/12/86"; */ ! static char rcsid[] = "$Header: acucntrl.c,v 1.2 87/03/09 15:46:20 root Exp $"; #endif /* acucntrl - turn around tty line between dialin and dialout *************** *** 65,74 **** --- 66,77 ---- #define NDZLINE 8 /* lines/dz */ #define NDHLINE 16 /* lines/dh */ #define NDMFLINE 8 /* lines/dmf */ + #define NDMZLINE 24 /* lines/dmz */ #define DZ11 1 #define DH11 2 #define DMF 3 + #define DMZ 4 #define NLVALUE(val) (nl[val].n_value) *************** *** 103,108 **** --- 106,120 ---- #define DMFSCAR 12 { "_dmfsoftCAR" }, + #define DMZOPEN 13 + { "_dmzopen" }, + #define DMZINFO 14 + { "_dmzinfo" }, + #define NDMZ 15 + { "_ndmz" }, + #define DMZSCAR 16 + { "_dmzsoftCAR" }, + { "\0" } }; *************** *** 597,602 **** --- 609,615 ---- * > Knows about DZ11s and DH11/DM11s. * > 23.3.83 - TS * > modified to know about DMF's (hasn't been tested) Nov 8, 1984 - WLS + * > modified to know about DMZ's - wrk@abvax */ *************** *** 660,665 **** --- 673,684 ---- line = minor(dev) % NDMFLINE; addr = (int) &(((int *)NLVALUE(DMFINFO))[unit]); (void)lseek(kmem, (off_t) NLVALUE(NDMF), 0); + } else if((int)(cdevsw.d_open) == NLVALUE(DMZOPEN)) { + devtype = DMZ; + unit = minor(dev) / NDMZLINE; + line = minor(dev) % NDMZLINE; + addr = (int) &(((int *)NLVALUE(DMZINFO))[unit]); + (void)lseek(kmem, (off_t) NLVALUE(NDMZ), 0); } else { fprintf(stderr, "Device %s (%d/%d) unknown.\n", ttyline, major(dev), minor(dev)); *************** *** 705,710 **** --- 724,738 ---- case DMF: if((addr = NLVALUE(DMFSCAR)) == 0) { fprintf(stderr, "No dmfsoftCAR.\n"); + return(-1); + } + cflags = flags; + (void)lseek(kmem, (off_t) &(((char *)addr)[unit]), 0); + (void)write(kmem, (char *) &flags, sizeof cflags); + break; + case DMZ: + if((addr = NLVALUE(DMZSCAR)) == 0) { + fprintf(stderr, "No dmzsoftCAR.\n"); return(-1); } cflags = flags; ------- Bill King @ Allen-Bradley Company, Inc. ...!{decvax,pyramid,cwruecmp}!abic!wrk
jch@omnigate.clarkson.EDU (Jeffrey C Honig) (05/01/87)
Does anyone have patched for acucntrl to work with a dhv11? Jeff