Re: New and improved? patch

Dieter <[email protected]>
Newsgroups gmane.os.freebsd.devel.firewire
Message-ID <[email protected]>
> 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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-firewire
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.