nfs-ganesha 1.4
Defines | Functions

fsal_symlinks.c File Reference

#include <string.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include "nfs4.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
#include "fsal_common.h"
#include "nfs_proto_functions.h"
#include "nfs_proto_tools.h"
#include "fsal_nfsv4_macros.h"

Go to the source code of this file.

Defines

#define FSAL_READLINK_NB_OP_ALLOC   4
#define FSAL_READLINK_IDX_OP_PUTFH   0
#define FSAL_READLINK_IDX_OP_READLINK   1
#define FSAL_READLINK_IDX_OP_GETATTR   2
#define FSAL_SYMLINK_NB_OP_ALLOC   4
#define FSAL_SYMLINK_VAL_BUFFER   1024
#define FSAL_SYMLINK_IDX_OP_PUTFH   0
#define FSAL_SYMLINK_IDX_OP_SYMLINK   1
#define FSAL_SYMLINK_IDX_OP_GETFH   2
#define FSAL_SYMLINK_IDX_OP_GETATTR   3

Functions

fsal_status_t PROXYFSAL_readlink (fsal_handle_t *linkhandle, fsal_op_context_t *context, fsal_path_t *p_link_content, fsal_attrib_list_t *link_attributes)
fsal_status_t PROXYFSAL_symlink (fsal_handle_t *parent_directory_handle, fsal_name_t *p_linkname, fsal_path_t *p_linkcontent, fsal_op_context_t *context, fsal_accessmode_t accessmode, fsal_handle_t *link_handle, fsal_attrib_list_t *link_attributes)

Define Documentation

#define FSAL_READLINK_IDX_OP_GETATTR   2
#define FSAL_READLINK_IDX_OP_PUTFH   0
#define FSAL_READLINK_IDX_OP_READLINK   1
#define FSAL_READLINK_NB_OP_ALLOC   4
#define FSAL_SYMLINK_IDX_OP_GETATTR   3
#define FSAL_SYMLINK_IDX_OP_GETFH   2
#define FSAL_SYMLINK_IDX_OP_PUTFH   0
#define FSAL_SYMLINK_IDX_OP_SYMLINK   1
#define FSAL_SYMLINK_NB_OP_ALLOC   4
#define FSAL_SYMLINK_VAL_BUFFER   1024

Function Documentation

fsal_status_t PROXYFSAL_readlink ( fsal_handle_t linkhandle,
fsal_op_context_t context,
fsal_path_t p_link_content,
fsal_attrib_list_t link_attributes 
)

FSAL_readlink: Read the content of a symbolic link.

Parameters:
linkhandle(input): Handle of the link to be read.
cred(input): Authentication context for the operation (user,...).
p_link_content(output): Pointer to an fsal path structure where the link content is to be stored..
link_attributes(optionnal input/output): The post operation attributes of the symlink link. As input, it defines the attributes that the caller wants to retrieve (by positioning flags into this structure) and the output is built considering this input (it fills the structure according to the flags it contains). May be NULL.
Returns:
Major error codes :
  • ERR_FSAL_NO_ERROR (no error)
  • ERR_FSAL_STALE (linkhandle does not address an existing object)
  • ERR_FSAL_INVAL (linkhandle does not address a symbolic link)
  • ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
  • Other error codes can be returned : ERR_FSAL_ACCESS, ERR_FSAL_IO, ...

Definition at line 67 of file FSAL_PROXY/fsal_symlinks.c.

fsal_status_t PROXYFSAL_symlink ( fsal_handle_t parent_directory_handle,
fsal_name_t p_linkname,
fsal_path_t p_linkcontent,
fsal_op_context_t context,
fsal_accessmode_t  accessmode,
fsal_handle_t link_handle,
fsal_attrib_list_t link_attributes 
)

FSAL_symlink: Create a symbolic link.

Parameters:
parent_directory_handle(input): Handle of the parent directory where the link is to be created.
p_linkname(input): Name of the link to be created.
p_linkcontent(input): Content of the link to be created.
cred(input): Authentication context for the operation (user,...).
accessmode(ignored input): Mode of the link to be created. It has no sense in HPSS nor UNIX filesystems.
link_handle(output): Pointer to the handle of the created symlink.
link_attributes(optionnal input/output): Attributes of the newly created symlink. As input, it defines the attributes that the caller wants to retrieve (by positioning flags into this structure) and the output is built considering this input (it fills the structure according to the flags it contains). May be NULL.
Returns:
Major error codes :
  • ERR_FSAL_NO_ERROR (no error)
  • ERR_FSAL_STALE (parent_directory_handle does not address an existing object)
  • ERR_FSAL_NOTDIR (parent_directory_handle does not address a directory)
  • ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
  • Other error codes can be returned : ERR_FSAL_ACCESS, ERR_FSAL_IO, ...

Definition at line 229 of file FSAL_PROXY/fsal_symlinks.c.