mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
Implement linux_truncate64() syscall.
Tested by: Aline de Freitas <aline@riseup.net> Approved by: kib (mentor)
This commit is contained in:
parent
7ccf1fe813
commit
a6d043e30d
3 changed files with 18 additions and 2 deletions
|
|
@ -57,7 +57,6 @@ DUMMY(rt_sigqueueinfo);
|
|||
DUMMY(capget);
|
||||
DUMMY(capset);
|
||||
DUMMY(sendfile);
|
||||
DUMMY(truncate64);
|
||||
DUMMY(setfsuid);
|
||||
DUMMY(setfsgid);
|
||||
DUMMY(pivot_root);
|
||||
|
|
|
|||
|
|
@ -886,6 +886,7 @@ linux_readlinkat(struct thread *td, struct linux_readlinkat_args *args)
|
|||
LFREEPATH(name);
|
||||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
linux_truncate(struct thread *td, struct linux_truncate_args *args)
|
||||
{
|
||||
|
|
@ -904,6 +905,23 @@ linux_truncate(struct thread *td, struct linux_truncate_args *args)
|
|||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
linux_truncate64(struct thread *td, struct linux_truncate64_args *args)
|
||||
{
|
||||
char *path;
|
||||
int error;
|
||||
|
||||
LCONVPATHEXIST(td, args->path, &path);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (ldebug(truncate64))
|
||||
printf(ARGS(truncate64, "%s, %jd"), path, args->length);
|
||||
#endif
|
||||
|
||||
error = kern_truncate(td, path, UIO_SYSSPACE, args->length);
|
||||
LFREEPATH(path);
|
||||
return (error);
|
||||
}
|
||||
int
|
||||
linux_ftruncate(struct thread *td, struct linux_ftruncate_args *args)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ DUMMY(rt_sigqueueinfo);
|
|||
DUMMY(capget);
|
||||
DUMMY(capset);
|
||||
DUMMY(sendfile); /* different semantics */
|
||||
DUMMY(truncate64);
|
||||
DUMMY(setfsuid);
|
||||
DUMMY(setfsgid);
|
||||
DUMMY(pivot_root);
|
||||
|
|
|
|||
Loading…
Reference in a new issue