nfs-ganesha 1.4
Defines | Functions

fsal_convert.c File Reference

#include "fsal_convert.h"
#include "fsal_internal.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>

Go to the source code of this file.

Defines

#define MAX_2(x, y)   ( (x) > (y) ? (x) : (y) )
#define MAX_3(x, y, z)   ( (x) > (y) ? MAX_2((x),(z)) : MAX_2((y),(z)) )

Functions

int fuse2fsal_error (int errorcode, int noent_is_stale)
fsal_status_t posix2fsal_attributes (struct stat *p_buffstat, fsal_attrib_list_t *p_fsalattr_out)

Define Documentation

#define MAX_2 (   x,
 
)    ( (x) > (y) ? (x) : (y) )

Definition at line 24 of file FSAL_FUSELIKE/fsal_convert.c.

#define MAX_3 (   x,
  y,
 
)    ( (x) > (y) ? MAX_2((x),(z)) : MAX_2((y),(z)) )

Definition at line 25 of file FSAL_FUSELIKE/fsal_convert.c.


Function Documentation

int fuse2fsal_error ( int  errorcode,
int  noent_is_stale 
)

posix2fsal_error : Convert POSIX error codes to FSAL error codes.

Parameters:
posix_errorcode(input): The error code returned from POSIX.
Returns:
The FSAL error code associated to posix_errorcode.

Todo:
: The EBADF error also happens when file is opened for reading, and we try writting in it. In this case, we return ERR_FSAL_NOT_OPENED, but it doesn't seems to be a correct error translation.
Warning:
AIX returns EEXIST where BSD uses ENOTEMPTY; We want ENOTEMPTY to be interpreted anyway on AIX plateforms. Thus, we explicitely write its value (87).

Definition at line 38 of file FSAL_FUSELIKE/fsal_convert.c.

fsal_status_t posix2fsal_attributes ( struct stat *  p_buffstat,
fsal_attrib_list_t p_fsalattr_out 
)

Converts POSIX attributes (struct stat) to FSAL attributes (fsal_attrib_list_t)

Definition at line 168 of file FSAL_FUSELIKE/fsal_convert.c.