Lines Matching refs:buf
21 static void stat64_to_hostfs(const struct stat64 *buf, struct hostfs_stat *p) in stat64_to_hostfs() argument
23 p->ino = buf->st_ino; in stat64_to_hostfs()
24 p->mode = buf->st_mode; in stat64_to_hostfs()
25 p->nlink = buf->st_nlink; in stat64_to_hostfs()
26 p->uid = buf->st_uid; in stat64_to_hostfs()
27 p->gid = buf->st_gid; in stat64_to_hostfs()
28 p->size = buf->st_size; in stat64_to_hostfs()
29 p->atime.tv_sec = buf->st_atime; in stat64_to_hostfs()
31 p->ctime.tv_sec = buf->st_ctime; in stat64_to_hostfs()
33 p->mtime.tv_sec = buf->st_mtime; in stat64_to_hostfs()
35 p->blksize = buf->st_blksize; in stat64_to_hostfs()
36 p->blocks = buf->st_blocks; in stat64_to_hostfs()
37 p->maj = os_major(buf->st_rdev); in stat64_to_hostfs()
38 p->min = os_minor(buf->st_rdev); in stat64_to_hostfs()
43 struct stat64 buf; in stat_file() local
46 if (fstat64(fd, &buf) < 0) in stat_file()
48 } else if (lstat64(path, &buf) < 0) { in stat_file()
51 stat64_to_hostfs(&buf, p); in stat_file()
124 int read_file(int fd, unsigned long long *offset, char *buf, int len) in read_file() argument
128 n = pread64(fd, buf, len, *offset); in read_file()
135 int write_file(int fd, unsigned long long *offset, const char *buf, int len) in write_file() argument
139 n = pwrite64(fd, buf, len, *offset); in write_file()
337 int hostfs_do_readlink(char *file, char *buf, int size) in hostfs_do_readlink() argument
341 n = readlink(file, buf, size); in hostfs_do_readlink()
345 buf[n] = '\0'; in hostfs_do_readlink()
391 struct statfs64 buf; in do_statfs() local
394 err = statfs64(root, &buf); in do_statfs()
398 *bsize_out = buf.f_bsize; in do_statfs()
399 *blocks_out = buf.f_blocks; in do_statfs()
400 *bfree_out = buf.f_bfree; in do_statfs()
401 *bavail_out = buf.f_bavail; in do_statfs()
402 *files_out = buf.f_files; in do_statfs()
403 *ffree_out = buf.f_ffree; in do_statfs()
404 memcpy(fsid_out, &buf.f_fsid, in do_statfs()
405 sizeof(buf.f_fsid) > fsid_size ? fsid_size : in do_statfs()
406 sizeof(buf.f_fsid)); in do_statfs()
407 *namelen_out = buf.f_namelen; in do_statfs()