From owner-cvs-src@FreeBSD.ORG Sat May 22 09:51:43 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 705FD16A4CE; Sat, 22 May 2004 09:51:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 695A343D1F; Sat, 22 May 2004 09:51:43 -0700 (PDT) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i4MGpEC7061145; Sat, 22 May 2004 09:51:14 -0700 (PDT) (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i4MGpCEA061133; Sat, 22 May 2004 09:51:13 -0700 (PDT) (envelope-from marius) Message-Id: <200405221651.i4MGpCEA061133@repoman.freebsd.org> From: Marius Strobl Date: Sat, 22 May 2004 09:51:12 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.sbin/ofwdump Makefile ofw_util.c ofw_util.h ofwdump.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2004 16:51:43 -0000 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