From patchwork Sun Oct 14 15:17:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dieter Ries X-Patchwork-Id: 1591181 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 07170E00AD for ; Sun, 14 Oct 2012 15:17:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754052Ab2JNPRp (ORCPT ); Sun, 14 Oct 2012 11:17:45 -0400 Received: from psi.thgersdorf.net ([176.9.98.78]:48348 "EHLO mail.psioc.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753871Ab2JNPRn (ORCPT ); Sun, 14 Oct 2012 11:17:43 -0400 Received: from localhost (localhost [127.0.0.1]) by localhost.psioc.net (Postfix) with ESMTP id 8AF174D64A3; Mon, 15 Oct 2012 01:14:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at psioc.net Received: from mail.psioc.net ([127.0.0.1]) by localhost (mail.psioc.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tnSJ8ulb4WuW; Mon, 15 Oct 2012 01:14:11 +0200 (CEST) Received: from psioc.net (unknown [195.176.92.20]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.psioc.net (Postfix) with ESMTPSA id AFB264D641D; Mon, 15 Oct 2012 01:14:11 +0200 (CEST) From: Dieter Ries To: linux-btrfs@vger.kernel.org, dave@jikos.cz Cc: chris.mason@fusionio.com, Dieter Ries Subject: [PATCH 2/4] btrfs-progs: btrfsck: Print which filesystem to be checked to stdout Date: Sun, 14 Oct 2012 17:17:19 +0200 Message-Id: <1350227839-18806-1-git-send-email-mail@dieterries.net> X-Mailer: git-send-email 1.7.3.GIT In-Reply-To: <20121009150844.GT4405@twin.jikos.cz> References: <20121009150844.GT4405@twin.jikos.cz> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org This patch makes btrfsck print the filesystem, which is to be checked, to stdout, as well as the UUID of the corresponding partition. This should be helpful when analyzing (copied and pasted) output of btrfsck. Signed-off-by: Dieter Ries --- btrfsck.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/btrfsck.c b/btrfsck.c index 67f4a9d..ea654de 100644 --- a/btrfsck.c +++ b/btrfsck.c @@ -20,6 +20,7 @@ #define _GNU_SOURCE 1 #include #include +#include #include #include #include @@ -3492,6 +3493,7 @@ int main(int ac, char **av) struct btrfs_fs_info *info; struct btrfs_trans_handle *trans = NULL; u64 bytenr = 0; + char uuidbuf[37]; int ret; int num; int repair = 0; @@ -3540,9 +3542,10 @@ int main(int ac, char **av) } else if(ret) { fprintf(stderr, "%s is currently mounted. Aborting.\n", av[optind]); return -EBUSY; - } - + } info = open_ctree_fs_info(av[optind], bytenr, rw, 1); + uuid_unparse(info->super_copy.fsid, uuidbuf); + printf("Checking filesystem on %s\nUUID: %s\n",av[optind],uuidbuf); if (info == NULL) return 1;