From patchwork Thu Sep 4 03:09:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 4842731 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 55F639F50F for ; Thu, 4 Sep 2014 03:10:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65BE12020E for ; Thu, 4 Sep 2014 03:10:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6956220251 for ; Thu, 4 Sep 2014 03:10:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932109AbaIDDKC (ORCPT ); Wed, 3 Sep 2014 23:10:02 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:8488 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1756699AbaIDDKA (ORCPT ); Wed, 3 Sep 2014 23:10:00 -0400 X-IronPort-AV: E=Sophos;i="5.04,462,1406563200"; d="scan'208";a="35493566" Received: from localhost (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 04 Sep 2014 11:07:03 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s8439uBN005338 for ; Thu, 4 Sep 2014 11:09:56 +0800 Received: from localhost.localdomain (10.167.226.111) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 4 Sep 2014 11:10:08 +0800 From: Gui Hecheng To: CC: Gui Hecheng Subject: [PATCH] btrfs-progs: remove wrong set_argv0 for restore Date: Thu, 4 Sep 2014 11:09:24 +0800 Message-ID: <1409800164-14491-2-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1409800164-14491-1-git-send-email-guihc.fnst@cn.fujitsu.com> References: <1409800164-14491-1-git-send-email-guihc.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.111] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Before this patch, you could see the following after exec restore # :too few arguments The tool name "btrfs restore" is missing. The @set_argv0() function is introduced by: commit a184abc70f7b1468e6036ab576f1587ee0574668 btrfs-progs: move the check_argc_* functions into utils.c ... Also add a new function "set_argv0" to set the correct tool name: *btrfs-image*: too few arguments But @set_argv0() only applies to the independent tools with the name pattern btrfs-***. Since restore is now is subcommand under "btrfs", there is no need to use @set_argv0() before check_argc_* to repair the prompt tool name before "too few arguments". Signed-off-by: Gui Hecheng --- cmds-restore.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cmds-restore.c b/cmds-restore.c index f909429..38a131e 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -1229,7 +1229,6 @@ int cmd_restore(int argc, char **argv) } } - set_argv0(argv); if (!list_roots && check_argc_min(argc - optind, 2)) usage(cmd_restore_usage); else if (list_roots && check_argc_min(argc - optind, 1))