|
From: Tom H. <to...@co...> - 2008-01-04 00:19:21
|
On 03/01/2008, Nicholas Nethercote <nj...@cs...> wrote: > If a kernel type isn't present, a vki_* version should be added. > See the comment at the top of include/vki/vki-linux.h. > > But don't trust the man pages, they mostly describe glibc's wrappers for the > syscalls. These mostly are the same as the kernel syscalls, but not always. > Only trust the kernel code. Unfortunately, I can't remember where in the > kernel code the syscall prototypes are defined. There isn't one place - each call will be in a place appropriate to the systems it works on. In this case fs/sync.c is the file, and the prototype is: asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, unsigned int flags) So vki_loff_t is the thing to use. The wrapper should probably also validate the file descriptor like other wrappers which have file descriptor arguments do. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |