From owner-freebsd-net Mon Dec 2 5:48:45 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC18037B401; Mon, 2 Dec 2002 05:48:43 -0800 (PST) Received: from sdf.lonestar.org (sdf.lonestar.org [207.202.214.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BED943EC5; Mon, 2 Dec 2002 05:48:43 -0800 (PST) (envelope-from omestre@sdf.lonestar.org) Received: by sdf.lonestar.org (8.11.6+3.4W/8.11.6) id gB2DmVN20732; Mon, 2 Dec 2002 13:48:31 GMT Date: Mon, 2 Dec 2002 13:48:31 +0000 (UTC) From: omestre To: freebsd-hackers@freebsd.org Cc: freebsd-net@freebsd.org Subject: fh Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Thanks, Tim Kientzle, but i still need one "c code" to add to autoconf.c, and gets a NFS file handle to my root directory. We have the solution (diskless) with dhcp/bootp... but we do not want this anymore, due the things that i have sad before. Thanks. All that i need, is that c code... :) In vfs_syscalls.c i have found this "code": --- /* * Get (NFS) file handle */ #ifndef _SYS_SYSPROTO_H_ struct getfh_args { char *fname; fhandle_t *fhp; }; #endif int getfh(p, uap) struct proc *p; register struct getfh_args *uap; { struct nameidata nd; fhandle_t fh; register struct vnode *vp; int error; /* * Must be super user */ error = suser(p); if (error) return (error); NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, uap->fname, p); error = namei(&nd); if (error) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; bzero(&fh, sizeof(fh)); fh.fh_fsid = vp->v_mount->mnt_stat.f_fsid; error = VFS_VPTOFH(vp, &fh.fh_fid); vput(vp); if (error) return (error); error = copyout(&fh, uap->fhp, sizeof (fh)); return (error); } --- Can i adapt it for my porpouses? I need help, and i guess that here is the place... :) Somebody can help? omestre@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message