From patchwork Wed Nov 16 20:54:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9432735 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 88C4860471 for ; Wed, 16 Nov 2016 20:54:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A0AD28ECA for ; Wed, 16 Nov 2016 20:54:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CD5F29161; Wed, 16 Nov 2016 20:54:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDD5E28ECA for ; Wed, 16 Nov 2016 20:54:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753896AbcKPUyn (ORCPT ); Wed, 16 Nov 2016 15:54:43 -0500 Received: from mail-pg0-f52.google.com ([74.125.83.52]:34453 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753269AbcKPUym (ORCPT ); Wed, 16 Nov 2016 15:54:42 -0500 Received: by mail-pg0-f52.google.com with SMTP id x23so80124536pgx.1 for ; Wed, 16 Nov 2016 12:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=HkSJiScKe3o1igQZVpYZjkkd8lbRojoTkM26es4eOn0=; b=GPiGAxrstRSCfVrIGlhLAtB9s9Bs3AnYyNm1/gkhTKU99r6bNADZZDnb9nmMCBZnyH j5bcDg4pCUScUrE5bZ2D4AyxsVdUUMMNvyLKWFEaERmw0fBiilZzwQbsyLF4YO99hF2B D/0RicIfz3mdcOtfuNJDwdueQBRltDxiyoCHd2KIBdGOeOqW3v9TU6WtTHvkVpTvrz2N RuaiRbwBtP4zZz9r50Gt74y7EuBTvgyrL/L9yfycXn1rnmjmwWMEFc7FvbQNWeBch2gs Y6es8ivFteEWlAxxk1HLyvlflWTJe5kI4jJj4wfO+ilSHeXn+k3NQ5o1nfrZj6K8mhjF ifGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HkSJiScKe3o1igQZVpYZjkkd8lbRojoTkM26es4eOn0=; b=ismVyBQQX3/87z4NEVTZrAsAqUmJKOkV5+FMi88MP5LjtWim6uv4XRfW80PHIrbncw R9ritJ6TK0yHvQuDCBCWzZMFCMc4bKq6unNZx+rzmpFg5FMuCFVKsxiIDtDEykszL4BC Led/qGlQ/vBhKtvz09GKONyG91u/mvqNJ8Og29OJcrveZGJs2bpxZ70VHjdIT8AO2UFp 8RGLzj8eLgyvEnwTLZKrl3xr5IyjUWwl0UnwQ5MbWfa1eqlQFUi6al9MDJUQRCrinVJS UC6obDW4OBqemNheL1DWsZhOAKtvuwS3QSh9pm0gKpcutIz8nhk4BF93NcxVb4CO+hG3 HfhA== X-Gm-Message-State: ABUngvfkJQ+KER4YwYqt/j7autOw1epcYf3JbOEMzERQO7KCQBh2OHEo+LTOfbd5ovlIHWJj X-Received: by 10.99.48.68 with SMTP id w65mr12565929pgw.68.1479329681186; Wed, 16 Nov 2016 12:54:41 -0800 (PST) Received: from vader.thefacebook.com ([2620:10d:c090:180::7e92]) by smtp.gmail.com with ESMTPSA id c8sm56759541pfe.15.2016.11.16.12.54.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Nov 2016 12:54:40 -0800 (PST) From: Omar Sandoval To: linux-btrfs@vger.kernel.org Cc: kernel-team@fb.com Subject: [PATCH] btrfs-progs: check: fix missing newlines Date: Wed, 16 Nov 2016 12:54:32 -0800 Message-Id: <93c639e51b05a52d8cab650f0c8eb3d5fd0ef5bc.1479328997.git.osandov@fb.com> X-Mailer: git-send-email 2.10.2 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Omar Sandoval Also, the other progress messages go to stderr, so "checking extents" probably should, as well. Fixes: c7a1f66a205f ("btrfs-progs: check: switch some messages to common helpers") Signed-off-by: Omar Sandoval --- As a side note, it seems almost completely random whether we print to stdout or stderr for any given message. That could probably use some cleaning up for consistency. A quick run of e2fsck indicated that it prints almost everything on stdout except for usage and administrative problems. xfs_repair just seems to put everything in stderr. I personally like the e2fsck approach. Anyone have any preference? cmds-check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index 57c4300..3fb3bd7 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -11467,13 +11467,13 @@ int cmd_check(int argc, char **argv) } if (!ctx.progress_enabled) - printf("checking extents"); + fprintf(stderr, "checking extents\n"); if (check_mode == CHECK_MODE_LOWMEM) ret = check_chunks_and_extents_v2(root); else ret = check_chunks_and_extents(root); if (ret) - printf("Errors found in extent allocation tree or chunk allocation"); + error("errors found in extent allocation tree or chunk allocation"); ret = repair_root_items(info); if (ret < 0)