|
From: Russell S. <se...@cs...> - 2008-01-07 19:19:18
|
Tom Hughes wrote: > 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. Fixed. Thanks! > > The wrapper should probably also validate the file descriptor like > other wrappers which have file descriptor arguments do. I couldn't find any wrappers that do anything special with their file descriptor arguments. (Look at sys_llseek in syswrap-linux.c, for example...) I've attached an updated patch. -Rusty > > Tom > |