Bug in Xenix? -- Someone from SCO look here

P.Garbha pgd at bbt.se
Fri Aug 24 22:02:36 AEST 1990


Since none answered any of my questions about the broken (?) event
driver, i looked on /xenix with a disassembler, and came up with the
following code (for the routine that fails):

evisqueue(ip)
	struct inode *ip;
{
	int rdev;

	if ((ip->i_mode & IFMT) != IFCHR)
		return -1;
	rdev = ip->i_rdev;
	if (cdevsw[rdev].d_open != evopen)
		return -1;
	if (rdev < 0 || rdev >= v.v_evqueues)
		return -1;
	return rdev;
}

Now, this does not make sense at all to me. To first check
cdevsw[rdev].d_open, and after that range check rdev, does not look
correct to me. Besides v.v_evqueues happens to be 8, which is far to
little to keep a dev value.  I think something is wrong with my
disassembling, or the routine, or my understanding of it.

In any case, if I patch the routine to just return rdev, the mouse
always works, instead of just sometimes.

Could someone with Xenix-source-code access please check this out?



More information about the Comp.unix.xenix mailing list