Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linux/linux_stats.c
Context not available. | |||||
static int | static int | ||||
bsd_to_linux_statfs(struct statfs *bsd_statfs, struct l_statfs *linux_statfs) | bsd_to_linux_statfs(struct statfs *bsd_statfs, struct l_statfs *linux_statfs) | ||||
{ | { | ||||
#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) | #if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) | ||||
uint64_t tmp; | uint64_t tmp; | ||||
#define LINUX_HIBITS 0xffffffff00000000ULL | #define LINUX_HIBITS 0xffffffff00000000ULL | ||||
Context not available. | |||||
(tmp & LINUX_HIBITS)) | (tmp & LINUX_HIBITS)) | ||||
return (EOVERFLOW); | return (EOVERFLOW); | ||||
#undef LINUX_HIBITS | #undef LINUX_HIBITS | ||||
#endif | #endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */ | ||||
linux_statfs->f_type = bsd_to_linux_ftype(bsd_statfs->f_fstypename); | linux_statfs->f_type = bsd_to_linux_ftype(bsd_statfs->f_fstypename); | ||||
linux_statfs->f_bsize = bsd_statfs->f_bsize; | linux_statfs->f_bsize = bsd_statfs->f_bsize; | ||||
linux_statfs->f_blocks = bsd_statfs->f_blocks; | linux_statfs->f_blocks = bsd_statfs->f_blocks; | ||||
Context not available. | |||||
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); | return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); | ||||
} | } | ||||
#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) | #if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) | ||||
static void | static void | ||||
bsd_to_linux_statfs64(struct statfs *bsd_statfs, struct l_statfs64 *linux_statfs) | bsd_to_linux_statfs64(struct statfs *bsd_statfs, struct l_statfs64 *linux_statfs) | ||||
{ | { | ||||
Context not available. | |||||
bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs); | bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs); | ||||
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); | return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs))); | ||||
} | } | ||||
#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ | #endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */ | ||||
int | int | ||||
linux_fstatfs(struct thread *td, struct linux_fstatfs_args *args) | linux_fstatfs(struct thread *td, struct linux_fstatfs_args *args) | ||||
Context not available. | |||||
return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
} | } | ||||
#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) | #if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) | ||||
static int | static int | ||||
stat64_copyout(struct stat *buf, void *ubuf) | stat64_copyout(struct stat *buf, void *ubuf) | ||||
Context not available. | |||||
return (error); | return (error); | ||||
} | } | ||||
#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ | #endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */ | ||||
int | int | ||||
linux_syncfs(struct thread *td, struct linux_syncfs_args *args) | linux_syncfs(struct thread *td, struct linux_syncfs_args *args) | ||||
Context not available. |