Date: Sat, 06 Sep 2008 19:20:35 -0700 From: Sean Bruno <sbruno@miralink.com> To: Dieter <freebsd@sopwith.solgatos.com> Cc: freebsd-firewire@freebsd.org Subject: Re: New and improved? patch Message-ID: <48C33A73.80504@miralink.com> In-Reply-To: <200808312005.UAA08072@sopwith.solgatos.com> References: <200808312005.UAA08072@sopwith.solgatos.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Dieter wrote: >> 7.0 AMD64 # ./fwcontrol -f -5 >> fwcontrol: main:set_root_node out of range: No such file or directory >> >> "No such file or directory" seems wrong >> > > err(EX_USAGE, "%s:set_root_node out of range", __func__); > > Err() is correct for places where errno would be set, such as > checking the return code from read(2). But for the range checks, > errno does not apply, so err() gives misleading results. > > The err(3) man page isn't clear, but it looks like errx(3) is > the function you want for the range checks. > > Changing err() to errx() gives: > > 7.0 AMD64 # ./fwcontrol -f 70 > fwcontrol: main:set_root_node out of range > Yup. I completely agree here. -- Sean Bruno MiraLink Corporation 6015 NE 80th Ave, Ste 100 Portland, OR 97218 Cell 503-358-6832 Phone 503-621-5143 Fax 503-621-5199 MSN: sbruno@miralink.com Google: seanwbruno@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48C33A73.80504>