getdirentries_args and other kernel syscall structures

Daniel Rudy dr2867 at
Wed Nov 23 04:32:11 GMT 2005

Ok, I'va got a little question here.  In the structure
getdirentries_args, there seems to be duplicated fields that I'm not
entirely sure what they do.  Here's the definition of a structure
verbatim from sys/sysproto.h:

struct getdirentries_args {
        char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
        char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
        char count_l_[PADL_(u_int)]; u_int count; char
        char basep_l_[PADL_(long *)]; long * basep; char
basep_r_[PADR_(long *)];

Now my question is what does the l and r variables do?  It seems that
they do something with padding the data based on the endian of the
machine?  I look through this header file, and I see all the structures
have similar constructs.  Is it something that can be safely ignored?

Daniel Rudy

More information about the freebsd-hackers mailing list