From patchwork Sun Apr 24 09:43:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 92648 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 78C23B6F5A for ; Sun, 24 Apr 2011 19:43:30 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A33B2280DF; Sun, 24 Apr 2011 11:43:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xtByCe9CGzB7; Sun, 24 Apr 2011 11:43:27 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 84C4B280E5; Sun, 24 Apr 2011 11:43:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 67B17280E6 for ; Sun, 24 Apr 2011 11:43:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZEMzW5f8ZUYG for ; Sun, 24 Apr 2011 11:43:21 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by theia.denx.de (Postfix) with ESMTPS id 068F3280DF for ; Sun, 24 Apr 2011 11:43:19 +0200 (CEST) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id DF4271B4020 for ; Sun, 24 Apr 2011 09:43:17 +0000 (UTC) From: Mike Frysinger To: u-boot@lists.denx.de Date: Sun, 24 Apr 2011 05:43:24 -0400 Message-Id: <1303638204-3262-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.5.rc1 Subject: [U-Boot] [PATCH] cmd_usage: constify X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The usage helper doesn't modify the command, so constify its input arg. Signed-off-by: Mike Frysinger --- common/command.c | 2 +- include/command.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/command.c b/common/command.c index b3ec510..ddaed68 100644 --- a/common/command.c +++ b/common/command.c @@ -140,7 +140,7 @@ cmd_tbl_t *find_cmd (const char *cmd) return find_cmd_tbl(cmd, &__u_boot_cmd_start, len); } -int cmd_usage(cmd_tbl_t *cmdtp) +int cmd_usage(const cmd_tbl_t *cmdtp) { printf("%s - %s\n\n", cmdtp->name, cmdtp->usage); diff --git a/include/command.h b/include/command.h index 8310fe5..cab9651 100644 --- a/include/command.h +++ b/include/command.h @@ -71,7 +71,7 @@ int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int cmd_tbl_t *find_cmd(const char *cmd); cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len); -extern int cmd_usage(cmd_tbl_t *cmdtp); +extern int cmd_usage(const cmd_tbl_t *cmdtp); #ifdef CONFIG_AUTO_COMPLETE extern int var_complete(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]);