Add a new command "bmap" to debugfs which calculates the logical->physical block 
mapping for a particular inode.

Fixed a bug in the libext2 library which broke ext2fs_bmap if no inode structre
was passed inside for here.

Fixed bad calling parameters to parse_ulong which broken the -b  and -s
options to debugfs, as well as do_init, and the testb, setb, clearb functions.

diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog
index 61032e5..eda86e7 100644
--- a/lib/ext2fs/ChangeLog
+++ b/lib/ext2fs/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-11    <tytso@snap.thunk.org>
+
+	* bmap.c (ext2fs_bmap): Fix bug which caused ext2fs_bmap to fail
+		silently if inode pointer is NULL (and ext2fs_bmap is
+		expected to read the inode itself).
+
 2002-04-27    <tytso@snap.thunk.org>
 
 	* ismounted.c (check_mntent_file, is_swap_device): Verify that the
diff --git a/lib/ext2fs/bmap.c b/lib/ext2fs/bmap.c
index b8b5280..0fb56d6 100644
--- a/lib/ext2fs/bmap.c
+++ b/lib/ext2fs/bmap.c
@@ -139,7 +139,7 @@
 	/* Read inode structure if necessary */
 	if (!inode) {
 		retval = ext2fs_read_inode(fs, ino, &inode_buf);
-		if (!retval)
+		if (retval)
 			return retval;
 		inode = &inode_buf;
 	}