Help Needed with Xenix Device Drivers
Conor P. Cahill
cpcahil at virtech.uucp
Wed Aug 29 21:38:47 AEST 1990
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 at bmhalh.UUCP> bruce at 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
More information about the Comp.unix.questions
mailing list