nameToXfid() Kernel Service
Purpose
Obtains the xfid
value and attributes for a specific file name.
Syntax
#include <sys/xfops.h>
#include <sys/vattr.h>
int nameToXfid(char *pathname,
struct xfid *xfp,
struct vattr *vap,
long flags);
Description
A kernel extension might need to convert a path name to an xfid_t
structure. The
nameToXfid()
kernel service returns the xfid
value for a specific
path name.
Parameters
- pathname
- Full path name of the file for which an
xfid
value is needed. - xfp
- Pointer to an
xfid_t
structure to hold thexfid
value that is set by this routine. - vap
- Pointer to a
vattr
structure to be entered by this routine. No attributes are set if the pointer is null. - flags
- Operation modifiers. This parameter must be set to zero.
Return values
- 0
- Indicates success. The
xfid
value and the optionalvattr
structure are returned. - ENOENT
- Name not found.
- EPERM
- No permission for lookup.
- EINVAL
- Invalid parameter is specified.