]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
debugfs.c:
authorTheodore Ts'o <tytso@mit.edu>
Sat, 19 Aug 2000 17:33:28 +0000 (17:33 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 19 Aug 2000 17:33:28 +0000 (17:33 +0000)
  Fixup one more missing use of lb->f instead stdout when printing the
  comma separator.
ChangeLog, util.c:
  util.c (open_pager): Set SIGPIPE to be ignored, so that quitting out
   of the pager doesn't blow away debugfs.

debugfs/ChangeLog
debugfs/debugfs.c
debugfs/util.c

index bcc34f1fd76e1cbd71a2b31c6a66b4ffc65d0f9b..a55751af012a5418b5a006cc76e56209225f7d70 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-19    <tytso@valinux.com>
+
+       * util.c (open_pager): Set SIGPIPE to be ignored, so that quitting
+               out of the pager doesn't blow away debugfs.
+
 2000-08-14    <tytso@valinux.com>
 
        * debugfs.c (do_show_super_stats): Use list_super2() instead of
index c847fc65b99d6459f09e9b0b4fa1e320c57adb10..43061bab7c9d3749891a52b076f65e0aadd53de9 100644 (file)
@@ -378,7 +378,7 @@ static int list_blocks_proc(ext2_filsys fs, blk_t *blocknr, int blockcnt,
        if (lb->first)
                lb->first = 0;
        else
-               printf(", ");
+               fprintf(lb->f, ", ");
        if (blockcnt == -1)
                fprintf(lb->f, "(IND):%d", *blocknr);
        else if (blockcnt == -2)
index fc02ed55098d82506e52c4bc662b317fdf2f802f..d11578d6674c9626fce141b181af28ea45ad0dab 100644 (file)
@@ -12,6 +12,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <time.h>
+#include <signal.h>
 
 #include "debugfs.h"
 
@@ -20,6 +21,7 @@ FILE *open_pager(void)
        FILE *outfile;
        char *pager = getenv("PAGER");
 
+       signal(SIGPIPE, SIG_IGN);
        if (!pager)
                pager = "more";