53 return FILEIO_ENOTDIR;
73 return FILEIO_ENAMETOOLONG;
75 return FILEIO_EUNKNOWN;
85 if (fileio_open_flags & ~FILEIO_O_SUPPORTED)
88 if (fileio_open_flags & FILEIO_O_CREAT)
89 open_flags |= O_CREAT;
90 if (fileio_open_flags & FILEIO_O_EXCL)
92 if (fileio_open_flags & FILEIO_O_TRUNC)
93 open_flags |= O_TRUNC;
94 if (fileio_open_flags & FILEIO_O_APPEND)
95 open_flags |= O_APPEND;
96 if (fileio_open_flags & FILEIO_O_RDONLY)
97 open_flags |= O_RDONLY;
98 if (fileio_open_flags & FILEIO_O_WRONLY)
99 open_flags |= O_WRONLY;
100 if (fileio_open_flags & FILEIO_O_RDWR)
101 open_flags |= O_RDWR;
108 *open_flags_p = open_flags;
119 if (fileio_mode & ~FILEIO_S_SUPPORTED)
122 if (fileio_mode & FILEIO_S_IFREG)
124 if (fileio_mode & FILEIO_S_IFDIR)
126 if (fileio_mode & FILEIO_S_IFCHR)
128 if (fileio_mode & FILEIO_S_IRUSR)
130 if (fileio_mode & FILEIO_S_IWUSR)
132 if (fileio_mode & FILEIO_S_IXUSR)
135 if (fileio_mode & FILEIO_S_IRGRP)
139 if (fileio_mode & FILEIO_S_IWGRP)
143 if (fileio_mode & FILEIO_S_IXGRP)
146 if (fileio_mode & FILEIO_S_IROTH)
149 if (fileio_mode & FILEIO_S_IWOTH)
153 if (fileio_mode & FILEIO_S_IXOTH)
169 tmode |= FILEIO_S_IFREG;
171 tmode |= FILEIO_S_IFDIR;
173 tmode |= FILEIO_S_IFCHR;
175 tmode |= FILEIO_S_IRUSR;
177 tmode |= FILEIO_S_IWUSR;
179 tmode |= FILEIO_S_IXUSR;
182 tmode |= FILEIO_S_IRGRP;
186 tmode |= FILEIO_S_IWGRP;
190 tmode |= FILEIO_S_IXGRP;
193 tmode |= FILEIO_S_IROTH;
196 tmode |= FILEIO_S_IWOTH;
200 tmode |= FILEIO_S_IXOTH;
236 #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
237 blksize = st->st_blksize;
242 #if HAVE_STRUCT_STAT_ST_BLOCKS
int fileio_to_host_mode(int fileio_mode, mode_t *mode_p)
static void host_to_fileio_ulong(LONGEST num, fio_ulong_t fnum)
int fileio_to_host_openflags(int fileio_open_flags, int *open_flags_p)
static void host_to_fileio_time(time_t num, fio_time_t fnum)
static LONGEST fileio_mode_pack(mode_t mode)
static void host_to_fileio_uint(long num, fio_uint_t fnum)
void host_to_fileio_stat(struct stat *st, struct fio_stat *fst)
int host_to_fileio_error(int error)
static void host_to_bigendian(LONGEST num, char *buf, int bytes)
void error(const char *fmt,...)
static void host_to_fileio_mode(mode_t num, fio_mode_t fnum)