Lines Matching refs:zfp

133 int fs_open(struct fs_file_t *zfp, const char *file_name, fs_mode_t flags)  in fs_open()  argument
145 if (zfp->mp != NULL) { in fs_open()
177 zfp->mp = mp; in fs_open()
178 rc = mp->fs->open(zfp, file_name, flags); in fs_open()
181 zfp->mp = NULL; in fs_open()
186 zfp->flags = flags; in fs_open()
190 rc = mp->fs->truncate(zfp, 0); in fs_open()
193 zfp->mp = NULL; in fs_open()
201 int fs_close(struct fs_file_t *zfp) in fs_close() argument
205 if (zfp->mp == NULL) { in fs_close()
209 CHECKIF(zfp->mp->fs->close == NULL) { in fs_close()
213 rc = zfp->mp->fs->close(zfp); in fs_close()
219 zfp->mp = NULL; in fs_close()
224 ssize_t fs_read(struct fs_file_t *zfp, void *ptr, size_t size) in fs_read() argument
228 if (zfp->mp == NULL) { in fs_read()
232 CHECKIF(zfp->mp->fs->read == NULL) { in fs_read()
236 rc = zfp->mp->fs->read(zfp, ptr, size); in fs_read()
244 ssize_t fs_write(struct fs_file_t *zfp, const void *ptr, size_t size) in fs_write() argument
248 if (zfp->mp == NULL) { in fs_write()
252 CHECKIF(zfp->mp->fs->write == NULL) { in fs_write()
256 rc = zfp->mp->fs->write(zfp, ptr, size); in fs_write()
264 int fs_seek(struct fs_file_t *zfp, off_t offset, int whence) in fs_seek() argument
268 if (zfp->mp == NULL) { in fs_seek()
272 CHECKIF(zfp->mp->fs->lseek == NULL) { in fs_seek()
276 rc = zfp->mp->fs->lseek(zfp, offset, whence); in fs_seek()
284 off_t fs_tell(struct fs_file_t *zfp) in fs_tell() argument
288 if (zfp->mp == NULL) { in fs_tell()
292 CHECKIF(zfp->mp->fs->tell == NULL) { in fs_tell()
296 rc = zfp->mp->fs->tell(zfp); in fs_tell()
304 int fs_truncate(struct fs_file_t *zfp, off_t length) in fs_truncate() argument
308 if (zfp->mp == NULL) { in fs_truncate()
312 CHECKIF(zfp->mp->fs->truncate == NULL) { in fs_truncate()
316 rc = zfp->mp->fs->truncate(zfp, length); in fs_truncate()
324 int fs_sync(struct fs_file_t *zfp) in fs_sync() argument
328 if (zfp->mp == NULL) { in fs_sync()
332 CHECKIF(zfp->mp->fs->sync == NULL) { in fs_sync()
336 rc = zfp->mp->fs->sync(zfp); in fs_sync()