Path: utzoo!utgpu!watserv1!watmath!uunet!snorkelwacker!mit-eddie!andante!ulysses!dptg!mtune!jcm From: jcm@mtune.ATT.COM (John McMillan) Newsgroups: unix-pc.general Subject: Re: HELP with *BLOCK* device driver Message-ID: <300@mtune.ATT.COM> Date: 6 Feb 90 17:23:36 GMT References: <1990Feb5.074541.26335@stb.uucp> <1087@icus.islp.ny.us> Distribution: unix-pc Organization: AT&T BL Middletown/Lincroft NJ USA Lines: 27 In article <1087@icus.islp.ny.us> lenny@icus.islp.ny.us (Lenny Tropiano) writes: : >Ahh, I remember this well! :-) For some reason or another, a entry point >in the device driver called "drvprint()" is required. >drv is the driver name (ie. nfs) and the masterupd line being: > ># masterupd -a block open close strategy release print nfs > >The print-entry-point isn't discussed, at least to my recollection, in >the "Writing a Device Driver Guide" so I don't even know what it does, >and why it _might_ be called. : 1) It is ridiculous that an unsupplied PRINT param is not converted to a null procedure call. Not my code. "They" were probably rushed -- EVERYONE was rushed. 2) 'prdev()' is used to print FS errors: eg., prdev("Bad free count", dev); 'prdev(str,dev)' calls (*bdevsw[bmajor(dev)].d_print)(minor(dev), str); This permits logging or other activities particular to that device. 3) All -- the ONLY 8-) -- built-in BLOCK drivers ignore the feature by using 'nulldev' as the value for the procedure. jcm -- muttering for self, not them