From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 15 21:42:55 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2497C1065676 for ; Thu, 15 Jul 2010 21:42:55 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id CCBD48FC13 for ; Thu, 15 Jul 2010 21:42:54 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id B61A114DC146; Thu, 15 Jul 2010 23:42:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DF2i8rrDgrvy; Thu, 15 Jul 2010 23:42:50 +0200 (CEST) Received: from [192.168.1.105] (catv-80-99-92-167.catv.broadband.hu [80.99.92.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 663F714DBFCA; Thu, 15 Jul 2010 23:42:50 +0200 (CEST) Message-ID: <4C3F80D3.8080809@FreeBSD.org> Date: Thu, 15 Jul 2010 23:42:43 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: pluknet References: <4C39D92F.4050605@FreeBSD.org> <4C39DB09.6010808@andric.com> <4C39DBFF.2000307@FreeBSD.org> <4C3AF87B.3030707@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Dimitry Andric , FreeBSD Hackers Subject: Re: strange problem with int64_t variables 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: Thu, 15 Jul 2010 21:42:55 -0000 Em 2010.07.13. 16:05, pluknet escreveu: > #ifndef _SYS_SYSPROTO_H_ > struct setjlimit_args { > jid_t jid; > int resource; > struct rlimit *rlp; > }; > #endif > int > setjlimit(td, uap) > struct thread *td; > struct setjlimit_args /* { > jid_t jid; > int resource; > struct rlimit *rlp; > } */ *uap; > { > > printf("%s called\n", __FUNCTION__); > > printf("resource: %d\n", uap->resource); > if (uap->resource>= JLIM_NLIMITS) { > td->td_retval[0] = -1; > return (EINVAL); > } > return (0); > } > Thanks for trying this out. I still couldn't find the problem. Is this generate code? I mean the prototype of the function. I'm using C99 syntax and I manually added the implementation, the generated code what I'm using is just what make sysent generated. Besides, the generated code in sysproto.h is different from this struct that you have here, there are padding members, as well: +struct setjlimit_args { + char jid_l_[PADL_(__jid_t)]; __jid_t jid; char jid_r_[PADR_(__jid_t)]; + char resource_l_[PADL_(int)]; int resource; char resource_r_[PADR_(int)]; + char rlp_l_[PADL_(struct rlimit *)]; struct rlimit * rlp; char rlp_r_[PADR_(struct rlimit *)]; +}; And what do you have in syscalls.master? Is it the same as I have? +527 AUE_NULL STD { int setjlimit(__jid_t jid, int resource, \ + struct rlimit *rlp); } Gabor