unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



getfh(2)							     getfh(2)



NAME

  getfh	- Gets a file handle

SYNOPSIS

  #include <&lt;sys/types.h>&gt;
  #include <&lt;sys/mount.h>&gt;
  getfh(
	  int fd;
	  fhandle_t *fhp );
	  int exp_fd );

PARAMETERS

  fd	    File descriptor of the path	to be exported.

  fhp	    Points to a	fhandle_t structure.

  exp_fd    File descriptor of the exported path to use	when applying export
	    options.

DESCRIPTION

  The getfh() function returns a file handle for the specified file or direc-
  tory in the file handle pointed to by	the fhp	parameter.  This function is
  restricted to	the root user.

RETURN VALUES

  Upon successful completion, a	value of 0 (zero) is returned.	Otherwise, -1
  is returned and errno	is set to indicate the error.

ERRORS

  If the getfh() function fails, errno may be set to one of the	following
  values:

  [EBADF]   One	of the file descriptor parameters is not a valid file
	    descriptor.

  [EFAULT]  The	fhp parameter points to	an invalid address.

  [EPERM]   The	calling	process	does not have appropriate privilege.

  [EREMOTE] The	file system specified is not exportable.