From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 23 04:32:11 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E27616A41F for ; Wed, 23 Nov 2005 04:32:11 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: from smtp114.sbc.mail.mud.yahoo.com (smtp114.sbc.mail.mud.yahoo.com [68.142.198.213]) by mx1.FreeBSD.org (Postfix) with SMTP id 8799843D53 for ; Wed, 23 Nov 2005 04:32:10 +0000 (GMT) (envelope-from dr2867@pacbell.net) Received: (qmail 81119 invoked from network); 23 Nov 2005 04:32:09 -0000 Received: from unknown (HELO ?192.168.0.190?) (dr2867.business@pacbell.net@68.126.211.246 with plain) by smtp114.sbc.mail.mud.yahoo.com with SMTP; 23 Nov 2005 04:32:09 -0000 Message-ID: <4383F0CA.2030609@pacbell.net> Date: Tue, 22 Nov 2005 20:32:10 -0800 From: Daniel Rudy User-Agent: Mozilla/5.0 (X11R6; UNIX; FreeBSD/i386 5.4-RELEASE-p7; en-US; ja-JP; rv:1.7.12) Gecko/20050915 MultiZilla/1.6.2.0c Mnenhy/0.7.2.0 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: getdirentries_args and other kernel syscall structures X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 04:32:11 -0000 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 count_r_[PADR_(u_int)]; 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