Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!compuram!pgd From: pgd@bbt.se (P.Garbha) Newsgroups: comp.unix.xenix Subject: Bug in Xenix? -- Someone from SCO look here Message-ID: <1990Aug24.120236.269@bbt.se> Date: 24 Aug 90 12:02:36 GMT Organization: . Lines: 29 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?