From patchwork Mon Apr 6 21:02:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 458426 X-Patchwork-Delegate: sjg@chromium.org 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 A9B95140213 for ; Tue, 7 Apr 2015 07:02:48 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2A0BEB37CD; Mon, 6 Apr 2015 23:02:44 +0200 (CEST) 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 kMByovT6-1kd; Mon, 6 Apr 2015 23:02:43 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5D8A4B37D0; Mon, 6 Apr 2015 23:02:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A8E82B37B2 for ; Mon, 6 Apr 2015 23:02:37 +0200 (CEST) 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 WLa9evO51Tcf for ; Mon, 6 Apr 2015 23:02:37 +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 bhuna.collabora.co.uk (bhuna.collabora.co.uk [93.93.135.160]) by theia.denx.de (Postfix) with ESMTPS id 653194B615 for ; Mon, 6 Apr 2015 23:02:34 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sjoerd) with ESMTPSA id DB8F3600EF3 Received: by dusk.luon.net (Postfix, from userid 1000) id B19BB25587; Mon, 6 Apr 2015 23:02:28 +0200 (CEST) From: Sjoerd Simons To: Simon Glass Date: Mon, 6 Apr 2015 23:02:24 +0200 Message-Id: <1428354148-1511-5-git-send-email-sjoerd.simons@collabora.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1428354148-1511-1-git-send-email-sjoerd.simons@collabora.co.uk> References: <1428354148-1511-1-git-send-email-sjoerd.simons@collabora.co.uk> Cc: Steve Rae , Tom Rini , Masahiro Yamada , u-boot@lists.denx.de, York Sun Subject: [U-Boot] [PATCH v2 4/8] sandbox: Renamed sb command to host X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" As suggested by Simon Glass, rename the sb command to host but keep the old sb command as an alias Signed-off-by: Sjoerd Simons --- Changes in v2: None common/Makefile | 2 +- common/{cmd_sandbox.c => cmd_host.c} | 49 +++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 18 deletions(-) rename common/{cmd_sandbox.c => cmd_host.c} (62%) diff --git a/common/Makefile b/common/Makefile index 7216a13..ccb5b99 100644 --- a/common/Makefile +++ b/common/Makefile @@ -151,7 +151,7 @@ obj-$(CONFIG_CMD_PXE) += cmd_pxe.o obj-$(CONFIG_CMD_READ) += cmd_read.o obj-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o obj-$(CONFIG_CMD_REISER) += cmd_reiser.o -obj-$(CONFIG_SANDBOX) += cmd_sandbox.o +obj-$(CONFIG_SANDBOX) += cmd_host.o obj-$(CONFIG_CMD_SATA) += cmd_sata.o obj-$(CONFIG_CMD_SF) += cmd_sf.o obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o diff --git a/common/cmd_sandbox.c b/common/cmd_host.c similarity index 62% rename from common/cmd_sandbox.c rename to common/cmd_host.c index 4286969..d8a0bea 100644 --- a/common/cmd_sandbox.c +++ b/common/cmd_host.c @@ -10,25 +10,25 @@ #include #include -static int do_sandbox_load(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_host_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return do_load(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX); } -static int do_sandbox_ls(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_host_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return do_ls(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX); } -static int do_sandbox_save(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_host_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { return do_save(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX); } -static int do_sandbox_bind(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_host_bind(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc < 2 || argc > 3) @@ -44,7 +44,7 @@ static int do_sandbox_bind(cmd_tbl_t *cmdtp, int flag, int argc, return host_dev_bind(dev, file); } -static int do_sandbox_info(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_host_info(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { if (argc < 1 || argc > 2) @@ -85,25 +85,25 @@ static int do_sandbox_info(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -static cmd_tbl_t cmd_sandbox_sub[] = { - U_BOOT_CMD_MKENT(load, 7, 0, do_sandbox_load, "", ""), - U_BOOT_CMD_MKENT(ls, 3, 0, do_sandbox_ls, "", ""), - U_BOOT_CMD_MKENT(save, 6, 0, do_sandbox_save, "", ""), - U_BOOT_CMD_MKENT(bind, 3, 0, do_sandbox_bind, "", ""), - U_BOOT_CMD_MKENT(info, 3, 0, do_sandbox_info, "", ""), +static cmd_tbl_t cmd_host_sub[] = { + U_BOOT_CMD_MKENT(load, 7, 0, do_host_load, "", ""), + U_BOOT_CMD_MKENT(ls, 3, 0, do_host_ls, "", ""), + U_BOOT_CMD_MKENT(save, 6, 0, do_host_save, "", ""), + U_BOOT_CMD_MKENT(bind, 3, 0, do_host_bind, "", ""), + U_BOOT_CMD_MKENT(info, 3, 0, do_host_info, "", ""), }; -static int do_sandbox(cmd_tbl_t *cmdtp, int flag, int argc, +static int do_host(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { cmd_tbl_t *c; - /* Skip past 'sandbox' */ + /* Skip past 'host' */ argc--; argv++; - c = find_cmd_tbl(argv[0], cmd_sandbox_sub, - ARRAY_SIZE(cmd_sandbox_sub)); + c = find_cmd_tbl(argv[0], cmd_host_sub, + ARRAY_SIZE(cmd_host_sub)); if (c) return c->cmd(cmdtp, flag, argc, argv); @@ -112,8 +112,8 @@ static int do_sandbox(cmd_tbl_t *cmdtp, int flag, int argc, } U_BOOT_CMD( - sb, 8, 1, do_sandbox, - "Miscellaneous sandbox commands", + sb, 8, 1, do_host, + "Deprecated use host command instead - Miscellaneous sandbox commands", "load hostfs - [ ] - " "load a file from host\n" "sb ls hostfs - - list files on host\n" @@ -124,3 +124,18 @@ U_BOOT_CMD( "sb commands use the \"hostfs\" device. The \"host\" device is used\n" "with standard IO commands such as fatls or ext2load" ); + +U_BOOT_CMD( + host, 8, 1, do_host, + "Miscellaneous host commands", + "load hostfs - [ ] - " + "load a file from host\n" + "host ls hostfs - - list files on host\n" + "host save hostfs - [] - " + "save a file to host\n" + "host bind [] - bind \"host\" device to file\n" + "host info [] - show device binding & info\n" + "host commands use the \"hostfs\" device. The \"host\" device is used\n" + "with standard IO commands such as fatls or ext2load" +); +