ChangeLog, debugfs.c:
debugfs.c (do_stat, do_clri): Fix bug where debugfs wasn't displaying
the error message if ext2fs_read_inode() failed.
(do_rm): Fix similar problem for call to ext2fs_namei().
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 2cbad64..ab10934 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -382,7 +382,7 @@
retval = ext2fs_read_inode(current_fs, inode, &inode_buf);
if (retval)
{
- com_err(argv[0], 0, "Reading inode");
+ com_err(argv[0], retval, "while trying to read inode %d", inode);
return;
}
@@ -433,7 +433,8 @@
retval = ext2fs_read_inode(current_fs, inode, &inode_buf);
if (retval) {
- com_err(argv[0], 0, "while trying to read inode %d", inode);
+ com_err(argv[0], retval, "while trying to read inode %d",
+ inode);
return;
}
memset(&inode_buf, 0, sizeof(inode_buf));
@@ -1254,7 +1255,7 @@
retval = ext2fs_namei(current_fs, root, cwd, argv[1], &inode_num);
if (retval) {
- com_err(argv[0], 0, "Cannot find file");
+ com_err(argv[0], retval, "while trying to resolve filename");
return;
}