Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: getfh() systemcall Keywords: getfh() NFS Message-ID: <3682@auspex.auspex.com> Date: 18 Jul 90 18:57:19 GMT References: <1990Jul16.161053.4685@duc220.uni-duisburg.de> <2499@inews.intel.com> Distribution: comp Organization: Auspex Systems, Santa Clara Lines: 25 >The old getfh took a file descriptor, so > >getfh((char *)fd, fh) > >works where fd is a file descriptor returned by open(). Although this is, of course, 1) rather sleazy and 2) not intended to be supported indefinitely - there's a comment in the source code that says: * Also recognizes the old getfh() which takes a file * descriptor instead of a file name, and does the * right thing. This compatibility will go away in 5.0. * It goes away because if a file descriptor refers to * a file, there is no simple way to find its parent * directory. ("5.0", at this point, probably means "the next major release, which will be S5R4-based"), so you shouldn't actually pass file descriptors to "getfh()" - it's just there for binary compatibility.