]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
htree.c (do_htree_dump): Fix a bug where we were not cleanly
authorTheodore Ts'o <tytso@mit.edu>
Sun, 21 Jul 2002 18:17:45 +0000 (14:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 21 Jul 2002 18:17:45 +0000 (14:17 -0400)
closing the pager after errors, which would leave the
tty in noecho mode.

debugfs/ChangeLog
debugfs/htree.c

index 7ddbd21aef3ca9411e3977bf877b995808433ffe..b77a62a7ee36b6e8445a79458c44043201d63020 100644 (file)
@@ -1,3 +1,9 @@
+2002-07-21  Theodore Ts'o  <tytso@mit.edu>
+
+       * htree.c (do_htree_dump): Fix a bug where we were not cleanly
+               closing the pager after errors, which would leave the
+               tty in noecho mode.
+
 2002-07-18  Theodore Ts'o  <tytso@mit.edu>
 
        * htree.c (htree_dump_int_node): Add byte swapping code sot that
index e583849901f244a48a1b44f4157f1b53a3f6861f..1268a845b93f58a5a476cb3c07160eb7b77b8a58 100644 (file)
@@ -207,7 +207,7 @@ void do_htree_dump(int argc, char *argv[])
 
        if (argc > optind+1) {
                com_err(0, 0, "Usage: htree_dump [-l] file");
-               return;
+               goto errout;
        }
 
        if (argc == optind)
@@ -215,25 +215,25 @@ void do_htree_dump(int argc, char *argv[])
        else
                ino = string_to_inode(argv[optind]);
        if (!ino)
-               return;
+               goto errout;
 
        if (debugfs_read_inode(ino, &inode, argv[1]))
-               return;
+               goto errout;
 
        if (!LINUX_S_ISDIR(inode.i_mode)) {
                com_err(argv[0], 0, "Not a directory");
-               return;
+               goto errout;
        }
        
        if ((inode.i_flags & EXT2_BTREE_FL) == 0) {
                com_err(argv[0], 0, "Not a hash-indexed directory");
-               return;
+               goto errout;
        }
 
        buf = malloc(2*current_fs->blocksize);
        if (!buf) {
                com_err(argv[0], 0, "Couldn't allocate htree buffer");
-               return;
+               goto errout;
        }
 
        errcode = io_channel_read_blk(current_fs->io, inode.i_block[0],