pad argument for mmap/lseek/etc.

Kostik Belousov kostikbel at gmail.com
Mon Oct 8 08:31:12 PDT 2007


On Sun, Oct 07, 2007 at 04:02:37PM +0200, Roman Divacky wrote:
> hi
> 
> 3 months ago Peter Wemm removed "pad" argument from mmap/lseek/etc. syscalls
> arguments.
> 
> Unfortunately he forgot to update the struct XYZ_args definitions shipped
> with the actual functions like this:
> 
> vm/vm_mmap.c:
> 
> #ifndef _SYS_SYSPROTO_H_
> struct mmap_args {
>         void *addr;
>         size_t len;
>         int prot;
>         int flags;
>         int fd;
>         long pad;
>         off_t pos;
> };
> #endif
> 
> /*
>  * MPSAFE
>  */
> int
> mmap(td, uap)
>         struct thread *td;
>         struct mmap_args *uap;
> 
> it would be nice to get this removed. I'd submit a patch but I dont
> know what syscalls this affected.

You should lookup the corresponding commit that obviously touched
syscalls.master (seems to be rev. 1.232), and get the syscalls list from
there. Then, you should copy the old structure definitions to freebsd6_XXX
functions, and delete the paddings inplace.

The interesting question is whether the _SYS_SYSPROTO_H and absense of the
sys/sysproto.h supported. Or, shall we remove these #ifdef blocks instead
of fixing them in whole kernel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20071008/b8d01823/attachment.pgp


More information about the freebsd-current mailing list