From owner-freebsd-firewire@FreeBSD.ORG Mon Aug 11 23:52:08 2008 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AF401065675; Mon, 11 Aug 2008 23:52:08 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from parsely.rain.com (parsely.rain.com [199.26.172.196]) by mx1.freebsd.org (Postfix) with ESMTP id AC6CE8FC19; Mon, 11 Aug 2008 23:52:07 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from sopwith.solgatos.com (uucp@localhost) by parsely.rain.com (8.11.4/8.11.4) with UUCP id m7BNpvx31706; Mon, 11 Aug 2008 16:51:57 -0700 (PDT) (envelope-from freebsd@sopwith.solgatos.com) Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id XAA02248; Mon, 11 Aug 2008 23:47:05 GMT Message-Id: <200808112347.XAA02248@sopwith.solgatos.com> To: Sean Bruno In-reply-to: Your message of "Sat, 09 Aug 2008 13:12:28 PDT." <489DFA2C.4080407@miralink.com> Date: Mon, 11 Aug 2008 16:47:05 +0100 From: Dieter Cc: Scott Long , freebsd-firewire@freebsd.org Subject: Re: This is where I'm going with fwcontrol X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 23:52:08 -0000 [ I suggested changing priority_budget from int to long, but then realized that this only fixes it on LP64, not on ILP32. ] >> I suspect that gcc will still complain on ILP32 machines. > I implemented your fix for priority_budget, i.e. I should have been > paying attention to the conditional test and the assignment from strtol()! What arch are you compiling this on? Does gcc not complain on a ILP32 machine? If the intended legal range is 0-4294967295, a 32 bit signed integer isn't going to work. On ILP32, (long)0xffffffff has a value of -1, assuming 2's complement. Actually, strtol returns long, so the largest positive number it can return is 0x7fffffff = 2147483647. If we need 0-4294967295 perhaps use strtoll() which returns long long. ------------- On the fwcontrol man page, should -i pri_req Set the PRIORITY_BUDGET register on all supported nodes. be -b pri_req Set the PRIORITY_BUDGET register on all supported nodes. ? For the benefit of end users who are not firewire wizards, it would be nice for the man page to include the range of legal values and what they mean.