Cover V05, I04
Article
Listing 1
Listing 2
Listing 3
Listing 4
Listing 5

apr96.tar


Listing 3: SunOS_kbr and _msr helper scripts

#!/bin/sh

# Command:    SunOS_kbr
#
# Return keyboard character counts using file table
#
# Programmer: Doug Morris 1/17/96
#

# get device (major,minor) of keyboard

kbdev=`ls -l /dev/kbd|cut -c25-31|sed "s/, /,/"`

# get vnode pointer for keyboard stream device having (major,minor)

vnkb=`/etc/pstat -S|grep "$kbdev"|cut -c22-30`

# use vnode pointer to select file table entry and extract offset count

/etc/pstat -f|grep $vnkb


#!/bin/sh

# Command:    SunOS_msr
#
# Return mouse character counts using file table
#
# Programmer: Doug Morris 1/17/96
#

# get device (major,minor) of mouse

msdev=`ls -l /dev/mouse|cut -c25-31|sed "s/, /,/"`

# get vnode pointer for mouse stream device having (major,minor)

vnms=`/etc/pstat -S|grep "$msdev"|cut -c22-30`

# use vnode pointer to select file table entry and extract offset count

/etc/pstat -f|grep $vnms

# End of File