Replace calls to sys_truncate() with kern_truncate().
Reviewed by: kib@ MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9371
This commit is contained in:
parent
ea2ebdc19e
commit
fc8bde8ffe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313016
@ -1500,11 +1500,9 @@ freebsd32_lseek(struct thread *td, struct freebsd32_lseek_args *uap)
|
|||||||
int
|
int
|
||||||
freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap)
|
freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap)
|
||||||
{
|
{
|
||||||
struct truncate_args ap;
|
|
||||||
|
|
||||||
ap.path = uap->path;
|
return (kern_truncate(td, uap->path, UIO_USERSPACE,
|
||||||
ap.length = PAIR32TO64(off_t,uap->length);
|
PAIR32TO64(off_t, uap->length)));
|
||||||
return (sys_truncate(td, &ap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -1600,11 +1598,9 @@ freebsd6_freebsd32_lseek(struct thread *td, struct freebsd6_freebsd32_lseek_args
|
|||||||
int
|
int
|
||||||
freebsd6_freebsd32_truncate(struct thread *td, struct freebsd6_freebsd32_truncate_args *uap)
|
freebsd6_freebsd32_truncate(struct thread *td, struct freebsd6_freebsd32_truncate_args *uap)
|
||||||
{
|
{
|
||||||
struct truncate_args ap;
|
|
||||||
|
|
||||||
ap.path = uap->path;
|
return (kern_truncate(td, uap->path, UIO_USERSPACE,
|
||||||
ap.length = PAIR32TO64(off_t,uap->length);
|
PAIR32TO64(off_t, uap->length)));
|
||||||
return (sys_truncate(td, &ap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -3310,22 +3310,10 @@ struct otruncate_args {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
int
|
int
|
||||||
otruncate(td, uap)
|
otruncate(struct thread *td, struct otruncate_args *uap)
|
||||||
struct thread *td;
|
|
||||||
register struct otruncate_args /* {
|
|
||||||
char *path;
|
|
||||||
long length;
|
|
||||||
} */ *uap;
|
|
||||||
{
|
{
|
||||||
struct truncate_args /* {
|
|
||||||
char *path;
|
|
||||||
int pad;
|
|
||||||
off_t length;
|
|
||||||
} */ nuap;
|
|
||||||
|
|
||||||
nuap.path = uap->path;
|
return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length));
|
||||||
nuap.length = uap->length;
|
|
||||||
return (sys_truncate(td, &nuap));
|
|
||||||
}
|
}
|
||||||
#endif /* COMPAT_43 */
|
#endif /* COMPAT_43 */
|
||||||
|
|
||||||
@ -3334,11 +3322,8 @@ otruncate(td, uap)
|
|||||||
int
|
int
|
||||||
freebsd6_truncate(struct thread *td, struct freebsd6_truncate_args *uap)
|
freebsd6_truncate(struct thread *td, struct freebsd6_truncate_args *uap)
|
||||||
{
|
{
|
||||||
struct truncate_args ouap;
|
|
||||||
|
|
||||||
ouap.path = uap->path;
|
return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length));
|
||||||
ouap.length = uap->length;
|
|
||||||
return (sys_truncate(td, &ouap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user