Implement linux_truncate64() syscall.

Tested by:	Aline de Freitas <aline@riseup.net>
Approved by:	kib (mentor)
This commit is contained in:
Roman Divacky 2008-04-23 15:56:33 +00:00
parent 7ccf1fe813
commit a6d043e30d
3 changed files with 18 additions and 2 deletions

View file

@ -57,7 +57,6 @@ DUMMY(rt_sigqueueinfo);
DUMMY(capget);
DUMMY(capset);
DUMMY(sendfile);
DUMMY(truncate64);
DUMMY(setfsuid);
DUMMY(setfsgid);
DUMMY(pivot_root);

View file

@ -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)
{

View file

@ -60,7 +60,6 @@ DUMMY(rt_sigqueueinfo);
DUMMY(capget);
DUMMY(capset);
DUMMY(sendfile); /* different semantics */
DUMMY(truncate64);
DUMMY(setfsuid);
DUMMY(setfsgid);
DUMMY(pivot_root);