From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 20:36:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2832910656C2; Sun, 22 Mar 2009 20:36:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 153E48FC08; Sun, 22 Mar 2009 20:36:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2MKab5W082488; Sun, 22 Mar 2009 20:36:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2MKabLf082487; Sun, 22 Mar 2009 20:36:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200903222036.n2MKabLf082487@svn.freebsd.org> From: Marius Strobl Date: Sun, 22 Mar 2009 20:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190274 - stable/6/usr.sbin/eeprom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2009 20:36:39 -0000 Author: marius Date: Sun Mar 22 20:36:37 2009 New Revision: 190274 URL: http://svn.freebsd.org/changeset/base/190274 Log: MFC: 190097 - Sprinkle const. - Remove incorrect __unused. Modified: stable/6/usr.sbin/eeprom/ (props changed) stable/6/usr.sbin/eeprom/ofw_options.c Modified: stable/6/usr.sbin/eeprom/ofw_options.c ============================================================================== --- stable/6/usr.sbin/eeprom/ofw_options.c Sun Mar 22 20:36:26 2009 (r190273) +++ stable/6/usr.sbin/eeprom/ofw_options.c Sun Mar 22 20:36:37 2009 (r190274) @@ -52,18 +52,18 @@ __FBSDID("$FreeBSD$"); struct ofwo_extabent { const char *ex_prop; - int (*ex_handler)(struct ofwo_extabent *, int, const void *, - int, const char *); + int (*ex_handler)(const struct ofwo_extabent *, int, + const void *, int, const char *); }; -static int ofwo_oemlogo(struct ofwo_extabent *, int, const void *, int, - const char *); -static int ofwo_secmode(struct ofwo_extabent *, int, const void *, int, - const char *); -static int ofwo_secpwd(struct ofwo_extabent *, int, const void *, int, - const char *); +static int ofwo_oemlogo(const struct ofwo_extabent *, int, const void *, + int, const char *); +static int ofwo_secmode(const struct ofwo_extabent *, int, const void *, + int, const char *); +static int ofwo_secpwd(const struct ofwo_extabent *, int, const void *, + int, const char *); -static struct ofwo_extabent ofwo_extab[] = { +static const struct ofwo_extabent const ofwo_extab[] = { { "oem-logo", ofwo_oemlogo }, { "security-mode", ofwo_secmode }, { "security-password", ofwo_secpwd }, @@ -82,8 +82,8 @@ ofwo_printprop(const char *prop, const c } static int -ofwo_oemlogo(struct ofwo_extabent *exent, int fd, const void *buf, int buflen, - const char *val) +ofwo_oemlogo(const struct ofwo_extabent *exent, int fd, const void *buf, + int buflen, const char *val) { int lfd; char logo[OFWO_LOGO + 1]; @@ -118,8 +118,8 @@ ofwo_oemlogo(struct ofwo_extabent *exent } static int -ofwo_secmode(struct ofwo_extabent *exent, int fd, const void *buf, int buflen, - const char *val) +ofwo_secmode(const struct ofwo_extabent *exent, int fd, const void *buf, + int buflen, const char *val) { int res; @@ -146,8 +146,8 @@ ofwo_secmode(struct ofwo_extabent *exent } static int -ofwo_secpwd(struct ofwo_extabent *exent, int fd __unused, - const void *buf __unused, __unused int buflen, const char *val) +ofwo_secpwd(const struct ofwo_extabent *exent, int fd, const void *buf, + int buflen, const char *val) { void *pbuf; int len, pblen, rv; @@ -247,14 +247,14 @@ ofwo_dump(void) int fd, len, nlen, pblen; phandle_t optnode; char prop[OFWO_MAXPROP + 1]; - struct ofwo_extabent *ex; + const struct ofwo_extabent *ex; pblen = 0; pbuf = NULL; fd = ofw_open(O_RDONLY); optnode = ofw_optnode(fd); for (nlen = ofw_firstprop(fd, optnode, prop, sizeof(prop)); nlen != 0; - nlen = ofw_nextprop(fd, optnode, prop, prop, sizeof(prop))) { + nlen = ofw_nextprop(fd, optnode, prop, prop, sizeof(prop))) { len = ofw_getprop_alloc(fd, optnode, prop, &pbuf, &pblen, 1); if (len < 0) continue; @@ -278,7 +278,7 @@ ofwo_action(const char *prop, const char { void *pbuf; int fd, len, pblen, rv; - struct ofwo_extabent *ex; + const struct ofwo_extabent *ex; pblen = 0; rv = EX_OK; @@ -301,7 +301,7 @@ ofwo_action(const char *prop, const char rv = (*ex->ex_handler)(ex, fd, pbuf, len, val); else if (val) rv = ofwo_setstr(fd, pbuf, len, prop, val); - else + else ofwo_printprop(prop, (char *)pbuf, len); out: if (pbuf != NULL)