From patchwork Tue Nov 20 06:26:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Sheng-Hui X-Patchwork-Id: 1770951 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id CEEF73FCAE for ; Tue, 20 Nov 2012 06:27:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751827Ab2KTG1E (ORCPT ); Tue, 20 Nov 2012 01:27:04 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:47731 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751798Ab2KTG1C (ORCPT ); Tue, 20 Nov 2012 01:27:02 -0500 Received: by mail-ob0-f174.google.com with SMTP id wc20so5628658obb.19 for ; Mon, 19 Nov 2012 22:27:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=sxjWc0ZxgOzs+zttG23GvEv3hhQKTEMoztvRgtknsSA=; b=qb2mOLXT0ahLUQ2Sqii3Kk9VtrCHYO5k+yX5fWaFzaujS0+5oazIeIR521ou+j8zUe QPPjuYoWIRApCdPCRR982rwRg3Hdx8fBFaTcS+dPiIAwUJj64mdHYWNWMVUA0F0sE+tn QRieuz7D7osksJSvAYCJzrZ2QIKXWv26sB4KHKrQxO3cB57FBTiVDidu/9YBoUZYPZZO 5wcoZF3OlteBmKtvDm6BSO29AtLzoOC9226rLjyNElwM9RhKV9DtbVOiZTBU6FPRpYux VYR+BnWTUyfHZPhdcdCmzPPbimbx60RzcKT2G1+H+mOsdAFB87fDA/r9nGH/QiewTSEc It+A== Received: by 10.182.38.65 with SMTP id e1mr12372264obk.3.1353392820792; Mon, 19 Nov 2012 22:27:00 -0800 (PST) Received: from crossover.org ([202.108.130.138]) by mx.google.com with ESMTPS id 10sm9566047oeg.11.2012.11.19.22.26.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 22:26:59 -0800 (PST) Message-ID: <50AB22A6.6070203@gmail.com> Date: Tue, 20 Nov 2012 14:26:46 +0800 From: Wang Sheng-Hui User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: print the right mount checking info in restore.c Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The mount status is checked against the arg (argv[optind]), not the . Correct the info printed on mounted. Signed-off-by: Wang Sheng-Hui --- restore.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/restore.c b/restore.c index b9e5381..a7580f8 100644 --- a/restore.c +++ b/restore.c @@ -827,7 +827,7 @@ int main(int argc, char **argv) strerror(ret)); return ret; } else if (ret) { - fprintf(stderr, "%s is currently mounted. Aborting.\n", argv[optind + 1]); + fprintf(stderr, "%s is currently mounted. Aborting.\n", argv[optind]); return -EBUSY; }