Darrell,
> > I'm trying to initialize a network device, and I'm trying to download
> > code *into* my device from some binary system files. There is no "user
> > space" or user process, for that matter, to deal with at this point. I
> > just want to (at this step) open a file(s) directly from my device
> > driver, read the file(s), and download the relevant parts to my device.
>
> sysctl might also do the trick. to answer your question, here's some code:
>
> struct vnode *
> vp_open(char *fname)
> {
> struct vnode *vp;
> struct nameidata nd;
> int error;
>
> NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, fname, curproc);
< rest of good code sample snipped - see previous message>
This is great - thanks!
One question though (since I'm new to FreeBSD drivers):
Is "curproc" a global variable that will be set to the "right thing"
while my device driver is executing? Presuming that it is, it looks
like I can just take your sample code and run with it... :)
Thanks,
Gary
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message