Copyright (c) 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the fol...
NAMEgetfh lgetfh - get file handle
SYNOPSISIn sys/param.h In sys/mount.h Ft int Fn getfh const char *path fhandle_t *fhp Ft int Fn lgetfh const char *path fhandle_t *fhp
DESCRIPTIONThe Fn getfh system call returns a file handle for the specified file or directory in the file handle pointed to by Fa fhp . The Fn lgetfh system call is like Fn getfh except in the case where the named file is a symbolic link, in which case Fn lgetfh returns information about the link, while Fn getfh returns information about the file the link references. These system calls are restricted to the superuser.
RETURN VALUESRv -std
ERRORSThe Fn getfh and Fn lgetfh system calls fail if one or more of the following are true:
- Bq Er ENOTDIR
- A component of the path prefix of Fa path is not a directory.
- Bq Er ENAMETOOLONG
- The length of a component of Fa path exceeds 255 characters, or the length of Fa path exceeds 1023 characters.
- Bq Er ENOENT
- The file referred to by Fa path does not exist.
- Bq Er EACCES
- Search permission is denied for a component of the path prefix of Fa path .
- Bq Er ELOOP
- Too many symbolic links were encountered in translating Fa path .
- Bq Er EFAULT
- The Fa fhp argument points to an invalid address.
- Bq Er EIO
- An I/O error occurred while reading from or writing to the file system.