From: Theodore Ts'o Date: Sat, 19 Aug 2000 17:33:28 +0000 (+0000) Subject: debugfs.c: X-Git-Tag: E2FSPROGS-1_20~250 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=2c4a540636142a936889bbe4b85a2b9c56bfa458;p=tools%2Fe2fsprogs.git debugfs.c: 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. --- diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index bcc34f1..a55751a 100644 --- a/debugfs/ChangeLog +++ b/debugfs/ChangeLog @@ -1,3 +1,8 @@ +2000-08-19 + + * util.c (open_pager): Set SIGPIPE to be ignored, so that quitting + out of the pager doesn't blow away debugfs. + 2000-08-14 * debugfs.c (do_show_super_stats): Use list_super2() instead of diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index c847fc6..43061ba 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -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) diff --git a/debugfs/util.c b/debugfs/util.c index fc02ed5..d11578d 100644 --- a/debugfs/util.c +++ b/debugfs/util.c @@ -12,6 +12,7 @@ #include #include #include +#include #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";