Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getfh(2) [hpux man page]

getfh(2)							System Calls Manual							  getfh(2)

NAME
getfh() - return file handle for file on remote node SYNOPSIS
DESCRIPTION
The system call returns a file handle in the pointed to by fhp for the file pointed to by path. This information is used to perform an NFS mount for a remote node. is executed on the remote node; results are passed back to the program doing the NFS mount. The caller should never examine the file handle contents. The file handle only identifies a file to the node that produced the file handle. (The term "file handle" refers to an NFS concept.) The effective user ID of the calling process must be superuser. RETURN VALUE
returns the following values: Successful completion. Failure. is set to indicate the error. ERRORS
If fails, is set to one of the following values. [EINVAL] Invalid argument, or the file or directory has not been exported by (see exportfs(1M)). [ENOENT] File or directory specified by path does not exist. [EPERM] The effective user ID is not superuser. [EREMOTE] The file or directory specified by path is a remote file or directory. WARNINGS
This call should be used only by HP-supplied commands and is not recommended for use by non-HP-supplied programs. AUTHOR
was developed by Sun Microsystems, Inc. SEE ALSO
exportfs(1M), mount(1M), vfsmount(2). getfh(2)

Check Out this Related Man Page

GETFH(2)						      BSD System Calls Manual							  GETFH(2)

NAME
getfh, lgetfh -- get file handle LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/param.h> #include <sys/mount.h> int getfh(const char *path, fhandle_t *fhp); int lgetfh(const char *path, fhandle_t *fhp); DESCRIPTION
The getfh() system call returns a file handle for the specified file or directory in the file handle pointed to by fhp. The lgetfh() system call is like getfh() except in the case where the named file is a symbolic link, in which case lgetfh() returns information about the link, while getfh() returns information about the file the link references. These system calls are restricted to the superuser. RETURN VALUES
Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The getfh() and lgetfh() system calls fail if one or more of the following are true: [ENOTDIR] A component of the path prefix of path is not a directory. [ENAMETOOLONG] The length of a component of path exceeds 255 characters, or the length of path exceeds 1023 characters. [ENOENT] The file referred to by path does not exist. [EACCES] Search permission is denied for a component of the path prefix of path. [ELOOP] Too many symbolic links were encountered in translating path. [EFAULT] The fhp argument points to an invalid address. [EIO] An I/O error occurred while reading from or writing to the file system. SEE ALSO
fhopen(2), open(2), stat(2) HISTORY
The getfh() system call first appeared in 4.4BSD. BSD
April 14, 2011 BSD
Man Page

4 More Discussions You Might Find Interesting

1. SCO

Using NFS shares from RMCobol

I have set up a directory on a PC using smb and can access the directory using all normal unix commands. I want to be able to access files in the directory from RMCobol programs but get system error 46 which appears to be "no record locks available". Does anybody know what I need to do to... (3 Replies)
Discussion started by: rongrout
3 Replies

2. Shell Programming and Scripting

Retrying a remote connection after failure

Hi all, I am new to this forum and want an urgent help from you experts. I am currently using SunOs 5.10. I have a .cfi file which contains some commands to be executed in a node(MSC node in telecom) To connect to a node (for eg node name is MSC1) we have a shell script that has the... (5 Replies)
Discussion started by: interceptor16
5 Replies

3. UNIX for Advanced & Expert Users

What is a file handle? for NFS troubleshooting stale issue.

Experts, Can any one please explain about a "File Handle" , what it is. Can we see it, like an inode number. - Also what is the significance of it in "Stale NFS file handle" error. Thanks, (3 Replies)
Discussion started by: rveri
3 Replies

4. Shell Programming and Scripting

Except script fails to check file exists or not in remote node

Dear members, The following expect script connects to remote node and check for the file "authorized_keys" in directory /root/.ssh in remote node. However the result is always found even if the file exist or doesn't exist. expect { "$fname" { send_user "found\n" } Any idea what is... (4 Replies)
Discussion started by: Sudhakar333
4 Replies