linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: jonernst07@gmail.com, Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH] e4defrag: fix error reporting when ext2fs_open fails
Date: Thu, 10 Apr 2014 23:17:58 -0400	[thread overview]
Message-ID: <1397186278-20622-1-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <CAGW2f1HpTEihjEaSk+bTxDBFhSuxxUpLq2wdzoo59xQHOPC+3A@mail.gmail.com>

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 misc/e4defrag.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/misc/e4defrag.c b/misc/e4defrag.c
index a1224bb..0db5e4b 100644
--- a/misc/e4defrag.c
+++ b/misc/e4defrag.c
@@ -1797,10 +1797,10 @@ int main(int argc, char *argv[])
 			ret = ext2fs_open(dev_name, EXT2_FLAG_64BITS, 0,
 					  block_size, unix_io_manager, &fs);
 			if (ret) {
-				if (mode_flag & DETAIL) {
-					perror("Can't get super block info");
-					PRINT_FILE_NAME(argv[i]);
-				}
+				if (mode_flag & DETAIL)
+					com_err(argv[1], ret,
+						"while trying to open file system: %s",
+						dev_name);
 				continue;
 			}
 
-- 
1.9.0


      reply	other threads:[~2014-04-11  3:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09  5:37 xfstest-bld generic/018 fails due to e4defrag issue jon ernst
2014-04-09 22:03 ` Theodore Ts'o
2014-04-10  4:13   ` jon ernst
2014-04-10 13:56     ` Theodore Ts'o
2014-04-10 18:42       ` Darrick J. Wong
2014-04-11  3:07         ` Theodore Ts'o
2014-04-11  3:10           ` jon ernst
2014-04-11  3:17             ` Theodore Ts'o [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397186278-20622-1-git-send-email-tytso@mit.edu \
    --to=tytso@mit.edu \
    --cc=jonernst07@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).