From patchwork Wed Jul 10 08:36:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 2825559 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 9F9D79F7D6 for ; Wed, 10 Jul 2013 08:36:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8EE662011E for ; Wed, 10 Jul 2013 08:36:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDE6220119 for ; Wed, 10 Jul 2013 08:36:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753088Ab3GJIgp (ORCPT ); Wed, 10 Jul 2013 04:36:45 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:35211 "EHLO mail-we0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750894Ab3GJIgn (ORCPT ); Wed, 10 Jul 2013 04:36:43 -0400 Received: by mail-we0-f172.google.com with SMTP id q56so5708461wes.3 for ; Wed, 10 Jul 2013 01:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=EagkkuEkbnFwUMjvBmvB9m6W9FBN7FqtuLUA4fgqBDU=; b=PRaQ8Wuhk7KVIFMljs3oi39XGj5O9exvkMD+hFGdYGkLK4vlRnIS61+ebqYvVsxhX3 sn7pGRzOLghHZ9lTDpqppsmY5EdYdQ2ghYz9RkLHBQ4aag9poockstqegzAb0X3C4gtJ XjE5eQISeHSLDwD25NU8mfu2VxSHg8SQcyZg4pDNGRFqU76cW/da6ovxfAkmMtgIlS+K 1w0+NQBBy9HQpMiI2B7bfB77N9d5Xg3BeavHDzzjiTRS+k3cS3TVn2YWMlKeaKa+6dho PSTpdNTvxdWgeuud0v4RGobbsIQPdcdsyCbw57RmKCa0Ek3NPPiE7mFj1AIwfPwqXi0+ ECnQ== X-Received: by 10.194.1.226 with SMTP id 2mr17501865wjp.91.1373445402628; Wed, 10 Jul 2013 01:36:42 -0700 (PDT) Received: from storm-desktop.lan (bl10-255-22.dsl.telepac.pt. [85.243.255.22]) by mx.google.com with ESMTPSA id f8sm63972255wiv.0.2013.07.10.01.36.41 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Jul 2013 01:36:41 -0700 (PDT) From: Filipe David Borba Manana To: linux-btrfs@vger.kernel.org Cc: Filipe David Borba Manana Subject: [PATCH v2] Btrfs-progs: update usage message for cmds-restore Date: Wed, 10 Jul 2013 09:36:34 +0100 Message-Id: <1373445394-5491-1-git-send-email-fdmanana@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1373401897-31850-1-git-send-email-fdmanana@gmail.com> References: <1373401897-31850-1-git-send-email-fdmanana@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Mention that a target path argument is mandatory unless the -l option is supplied. Also mention about the existence of the -l option, which was previously not announced. $ btrfs restore -v /dev/sdb3 usage: btrfs restore [options] Try to restore files from a damaged filesystem (unmounted) -s get snapshots -v verbose -i ignore errors -o overwrite -t tree location -f filesystem location -u super mirror -d find dir $ echo $? 129 After specifying a target path, the command works as expected: $ btrfs restore -v /dev/sdb3 files2/ Restoring files2/file1 Done searching $ echo $? 0 V2: Updated command synopsis by suggestion of Anand Jain. Signed-off-by: Filipe David Borba Manana --- cmds-restore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmds-restore.c b/cmds-restore.c index eca528d..d362d79 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -956,7 +956,7 @@ out: } const char * const cmd_restore_usage[] = { - "btrfs restore [options] ", + "btrfs restore [options] | -l ", "Try to restore files from a damaged filesystem (unmounted)", "", "-s get snapshots", @@ -967,6 +967,7 @@ const char * const cmd_restore_usage[] = { "-f filesystem location", "-u super mirror", "-d find dir", + "-l list roots", NULL };