Replace sys_ftruncate() with kern_ftruncate() in various compats.
Reviewed by: kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9368
This commit is contained in:
parent
8787928589
commit
ae6b6ef6cb
@ -645,7 +645,6 @@ linux_sigaltstack(struct thread *td, struct linux_sigaltstack_args *uap)
|
||||
int
|
||||
linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args)
|
||||
{
|
||||
struct ftruncate_args sa;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (ldebug(ftruncate64))
|
||||
@ -653,9 +652,7 @@ linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args)
|
||||
(intmax_t)args->length);
|
||||
#endif
|
||||
|
||||
sa.fd = args->fd;
|
||||
sa.length = args->length;
|
||||
return sys_ftruncate(td, &sa);
|
||||
return (kern_ftruncate(td, args->fd, args->length));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1517,11 +1517,8 @@ freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap)
|
||||
int
|
||||
freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap)
|
||||
{
|
||||
struct ftruncate_args ap;
|
||||
|
||||
ap.fd = uap->fd;
|
||||
ap.length = PAIR32TO64(off_t,uap->length);
|
||||
return (sys_ftruncate(td, &ap));
|
||||
return (kern_ftruncate(td, uap->fd, PAIR32TO64(off_t, uap->length)));
|
||||
}
|
||||
|
||||
#ifdef COMPAT_43
|
||||
@ -1623,11 +1620,8 @@ freebsd6_freebsd32_truncate(struct thread *td, struct freebsd6_freebsd32_truncat
|
||||
int
|
||||
freebsd6_freebsd32_ftruncate(struct thread *td, struct freebsd6_freebsd32_ftruncate_args *uap)
|
||||
{
|
||||
struct ftruncate_args ap;
|
||||
|
||||
ap.fd = uap->fd;
|
||||
ap.length = PAIR32TO64(off_t,uap->length);
|
||||
return (sys_ftruncate(td, &ap));
|
||||
return (kern_ftruncate(td, uap->fd, PAIR32TO64(off_t, uap->length)));
|
||||
}
|
||||
#endif /* COMPAT_FREEBSD6 */
|
||||
|
||||
|
@ -939,15 +939,8 @@ linux_truncate64(struct thread *td, struct linux_truncate64_args *args)
|
||||
int
|
||||
linux_ftruncate(struct thread *td, struct linux_ftruncate_args *args)
|
||||
{
|
||||
struct ftruncate_args /* {
|
||||
int fd;
|
||||
int pad;
|
||||
off_t length;
|
||||
} */ nuap;
|
||||
|
||||
nuap.fd = args->fd;
|
||||
nuap.length = args->length;
|
||||
return (sys_ftruncate(td, &nuap));
|
||||
return (kern_ftruncate(td, args->fd, args->length));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -611,7 +611,6 @@ linux_sigaltstack(struct thread *td, struct linux_sigaltstack_args *uap)
|
||||
int
|
||||
linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args)
|
||||
{
|
||||
struct ftruncate_args sa;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (ldebug(ftruncate64))
|
||||
@ -619,9 +618,7 @@ linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args)
|
||||
(intmax_t)args->length);
|
||||
#endif
|
||||
|
||||
sa.fd = args->fd;
|
||||
sa.length = args->length;
|
||||
return sys_ftruncate(td, &sa);
|
||||
return (kern_ftruncate(td, args->fd, args->length));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -3365,11 +3365,8 @@ freebsd6_truncate(struct thread *td, struct freebsd6_truncate_args *uap)
|
||||
int
|
||||
freebsd6_ftruncate(struct thread *td, struct freebsd6_ftruncate_args *uap)
|
||||
{
|
||||
struct ftruncate_args ouap;
|
||||
|
||||
ouap.fd = uap->fd;
|
||||
ouap.length = uap->length;
|
||||
return (sys_ftruncate(td, &ouap));
|
||||
return (kern_ftruncate(td, uap->fd, uap->length));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user