Xref: utzoo comp.unix.i386:8279 comp.unix.xenix:12974 comp.unix.wizards:23698 comp.unix.questions:25086 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.i386,comp.unix.xenix,comp.unix.wizards,comp.unix.questions Subject: Re: Help Needed with Xenix Device Drivers Keywords: help xenix drivers device kernel Message-ID: <1990Aug29.113847.958@virtech.uucp> Date: 29 Aug 90 11:38:47 GMT References: <24@bmhalh.UUCP> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 31 First off, don't do this: >Followup-To: poster It gets people mad when they do a follow-up to somebody named poster on the local machine. If you want help, just leave the follow-up off. In article <24@bmhalh.UUCP> bruce@bmhalh.UUCP (Bruce M. Himebaugh) writes: >I am writing a character device driver under SCO Xenix (v2.3.3) and have run >across a stumbling block. During the read and write functions I wish to >access the current file postition (as set by lseek(S)). Per the documentation >that I have I access the element u_offset in the 'u' structure. This works >great for 0-65535. But, when I tell lseek(S) to move to postition 65536 the >value of u_offset gets set to 0 and if I move to 65537 it gets set to 1, etc. This sounds like you are using the u_offset as a short (or int) when it is really a long. The type of u_offset is usually a typedef (off_t) in /usr/include/sys/types.h. > >A second question is, where can I get a book (or books) on writing XENIX device >drivers? I have a book on UNIX device drivers, but Xenix is enough different >that it doesn't answer all my questions. Writing a Unix Device Driver by Janet Egan and Thomas Teixeira Published by John Wiley & sons. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170