Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/freebsd32/freebsd32_misc.c
Show First 20 Lines • Show All 3,564 Lines • ▼ Show 20 Lines | freebsd32_posix_fallocate(struct thread *td, | ||||
int error; | int error; | ||||
error = kern_posix_fallocate(td, uap->fd, | error = kern_posix_fallocate(td, uap->fd, | ||||
PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len)); | PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len)); | ||||
return (kern_posix_error(td, error)); | return (kern_posix_error(td, error)); | ||||
} | } | ||||
int | int | ||||
freebsd32_fspacectl(struct thread *td, struct freebsd32_fspacectl_args *uap) | |||||
brooks: With the removal of `spacectl_range32` this whole function is redundant. | |||||
{ | |||||
int error; | |||||
struct spacectl_range range; | |||||
error = copyin(uap->range, &range, sizeof(range)); | |||||
if (error != 0) | |||||
return (error); | |||||
error = kern_fspacectl(td, uap->fd, uap->cmd, uap->range, uap->flags); | |||||
return (error); | |||||
} | |||||
int | |||||
freebsd32_posix_fadvise(struct thread *td, | freebsd32_posix_fadvise(struct thread *td, | ||||
struct freebsd32_posix_fadvise_args *uap) | struct freebsd32_posix_fadvise_args *uap) | ||||
{ | { | ||||
int error; | int error; | ||||
error = kern_posix_fadvise(td, uap->fd, PAIR32TO64(off_t, uap->offset), | error = kern_posix_fadvise(td, uap->fd, PAIR32TO64(off_t, uap->offset), | ||||
PAIR32TO64(off_t, uap->len), uap->advice); | PAIR32TO64(off_t, uap->len), uap->advice); | ||||
return (kern_posix_error(td, error)); | return (kern_posix_error(td, error)); | ||||
▲ Show 20 Lines • Show All 256 Lines • ▼ Show 20 Lines | if (error == 0) { | ||||
if (error == 0) { | if (error == 0) { | ||||
timex_to_32(&tx32, &tx); | timex_to_32(&tx32, &tx); | ||||
error = copyout(&tx32, uap->tp, sizeof(tx32)); | error = copyout(&tx32, uap->tp, sizeof(tx32)); | ||||
if (error == 0) | if (error == 0) | ||||
td->td_retval[0] = retval; | td->td_retval[0] = retval; | ||||
} | } | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
Done Inline ActionsThis condition is still not fixed. BTW, I suggest to remove the error != 0 check at all. Copy *rqsr into *rmsr at the very beginning of kern_fspacectl() if rmsr != NULL, and it should be fine. kib: This condition is still not fixed.
BTW, I suggest to remove the error != 0 check at all. Copy… |
With the removal of spacectl_range32 this whole function is redundant.