Omari Stephens <[EMAIL PROTECTED]> writes:

> This would probably be an upstream question, but is there no way to
> check for a null pointer before dereferencing it?  I'm not familiar with
> kernel or AFS coding, but it seems like calling a function on faith with
> an inconsistent API is asking for problems.

Yeah, I find it odd that it fails in the way that it does.

The best idea that I've been able to come up with so far is to have afsd
do a statfs() of the cache path, if memory cache is not used, and then
inspect the f_type value of the returned struct and make sure that it's
EXT2_SUPER_MAGIC or EXT3_SUPER_MAGIC.  (I'm not sure if any of the other
file system types are allowable; that's the conservative approach.)

If there were a command-line program that would return the same
information, I could just call that in the init script, but I don't know
of one.

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to