Lazy Newbie Question

Calin A. Culianu (calin@ajvar.org)
Tue, 21 May 2002 11:36:01 -0400 (EDT)


Whats the best way to do the equivalent of a stat() on a char * pathname
from inside a kernel module? Don't ask why I need to do this.. I know it
sounds evil but I just need to do it... Basically I need to find out the
minor number of a device file.

I noticed there's a filp_open() function that is exported and it returns a
struct file *. I am not sure what the semantics of about 75% of the
fields in that struct are.. and/or how they relate to the well-documented
fields in the libc's struct stat. Any help/insights would be appreciated.

-Calin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/