nfs-ganesha 1.4
|
00001 00010 #ifndef _FSAL_CONVERTION_H 00011 #define _FSAL_CONVERTION_H 00012 00013 #include "fsal.h" 00014 00015 /* convert error codes */ 00016 int posix2fsal_error(int posix_errorcode); 00017 00018 fsal_status_t posixdb2fsal_error(fsal_posixdb_status_t statusdb); 00019 00021 #ifdef _FSAL_POSIX_USE_STREAM 00022 int fsal2posix_openflags(fsal_openflags_t fsal_flags, char *p_posix_flags); 00023 #else 00024 int fsal2posix_openflags(fsal_openflags_t fsal_flags, int *p_posix_flags); 00025 #endif 00026 00028 int fsal2posix_testperm(fsal_accessflags_t testperm); 00029 00030 /* 00031 * Converts POSIX attributes (struct stat) to FSAL attributes (fsal_attrib_list_t) 00032 */ 00033 fsal_status_t posix2fsal_attributes(struct stat *p_buffstat, 00034 fsal_attrib_list_t * p_fsalattr_out); 00035 00037 mode_t fsal2unix_mode(fsal_accessmode_t fsal_mode); 00038 00040 fsal_accessmode_t unix2fsal_mode(mode_t unix_mode); 00041 00044 fsal_nodetype_t posix2fsal_type(mode_t posix_type_in); 00045 00047 fsal_fsid_t posix2fsal_fsid(dev_t posix_devid); 00048 00054 fsal_time_t posix2fsal_time(time_t tsec, time_t nsec); 00055 00061 #define fsal2posix_time(_time_) ((time_t)(_time_).seconds) 00062 00063 #define high32m( a ) ( (unsigned int)( a >> 32 ) ) 00064 #define low32m( a ) ( (unsigned int)a ) 00065 00066 #endif