Date: Sat, 22 May 2004 09:51:12 -0700 (PDT) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.sbin/ofwdump Makefile ofw_util.c ofw_util.h ofwdump.c Message-ID: <200405221651.i4MGpCEA061133@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
marius 2004/05/22 09:51:12 PDT FreeBSD src repository Modified files: usr.sbin/ofwdump Makefile ofw_util.c ofw_util.h ofwdump.c Log: - Change ofwdump(8) to use sysexits(3) exit codes. - Make the code use the new OFIOCMAXVALUE instead of defining the maximum length of property values locally. - Move the application specific parts from ofw_util.c to ofwdump.c in order to make ofw_util.c more library-like. While ofw_dump_properties() could be made non-specific to ofwdump(8) it's currently optimized for use in ofwdump(8) and making it a library-like function would just complicate the code unnecessarily. - Minor clean-up in ofw_util.c, e.g. make its use of getopt(3) the way it's described in style(9), make its usage() static, etc. - Add a comment in ofw_util.c about why it doesn't call usage() when neither the "-a" option nor a node-name where given. - Add ofw_optnode() and ofw_setprop(), helper functions for the OFIOCGETOPTNODE and OFIOCSET ioctls respectively, to ofw_util.[c,h]. - Be consistent with the use of 'const' in ofw_util.[c,h] and add 'const' to the function arguments that are acutally const but weren't declared as such. - Mark WARNS=6 clean. Approved by: tmm Revision Changes Path 1.4 +1 -1 src/usr.sbin/ofwdump/Makefile 1.5 +40 -130 src/usr.sbin/ofwdump/ofw_util.c 1.3 +5 -6 src/usr.sbin/ofwdump/ofw_util.h 1.2 +139 -5 src/usr.sbin/ofwdump/ofwdump.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405221651.i4MGpCEA061133>