From 2b5ddd75c90ed4dce2ecdca12b59688a46b11b01 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 24 Jan 2004 18:54:41 -0500 Subject: [PATCH] For debugfs, use the "more" pager in preference to "less", since "less" doesn't work terribly well for debugfs's purpose. Document the DEBUGFS_PAGER and PAGER environment variables. --- RELEASE-NOTES | 2 +- debugfs/ChangeLog | 9 +++++++++ debugfs/debugfs.8.in | 30 ++++++++++++++++++++++++++++++ debugfs/util.c | 2 +- 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6f1ac911..59a7b76d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -64,7 +64,7 @@ correct mode bits. (Addresses Debian Bug: #217456) If the environment variables DEBUFS_PAGER and PAGER are not set, debugfs now searches for the appropriate pager to use, beginning with -/usr/bin/pager, and then falling back to 'less' and 'more'. +/usr/bin/pager, and then falling back to 'more' and 'less'. (Addresses Debian Bug: #221977) Fix regression tests so they work correctly when e2fsprogs is compiled diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index 4ca40ed5..92b0d99f 100644 --- a/debugfs/ChangeLog +++ b/debugfs/ChangeLog @@ -1,3 +1,12 @@ +2004-01-24 Theodore Ts'o + + * debugfs.8.in: Document the PAGER and DEBUGFS_PAGER environment + variables. + + * util.c (open_pager): Use the "more" pager in preference to + "less", since "less" doesn't work terribly well for + debugfs's purpose. + 2003-12-25 Theodore Ts'o * util.c (open_pager): Try to use the DEBUGFS_PAGER environment diff --git a/debugfs/debugfs.8.in b/debugfs/debugfs.8.in index 3cc0f960..944327be 100644 --- a/debugfs/debugfs.8.in +++ b/debugfs/debugfs.8.in @@ -434,6 +434,36 @@ Create a file in the filesystem named and copy the contents of .I source_file into the destination file. +.SH ENVIRONMENT VARIABLES +.TP +.B DEBUGFS_PAGER, PAGER +The +.BR debugfs (8) +program always pipes the output of the some commands through a +pager program. These commands include: +.IR show_super_stats , +.IR list_directory , +.IR show_inode_info , +.IR list_deleted_inodes , +and +.IR htree_dump . +The specific pager can explicitly specified by the +.B DEBUGFS_PAGER +environment variable, and if it is not set, by the +.B PAGER +environment variable. +.IP +Note that since a pager is always used, the +.BR less (1) +pager is not particularly appropriate, since it clears the screen before +displaying the output of the command and clears the output the screen +when the pager is exited. Many users prefer to use the +.BR less (1) +pager for most purposes, which is why the +.B DEBUGFS_PAGER +environment variable is available to override the more general +.B PAGER +environment variable. .SH AUTHOR .B debugfs was written by Theodore Ts'o . diff --git a/debugfs/util.c b/debugfs/util.c index 4da7f6e2..93ef7512 100644 --- a/debugfs/util.c +++ b/debugfs/util.c @@ -56,7 +56,7 @@ void reset_getopt(void) #endif } -static const char *pager_search_list[] = { "pager", "less", "more", 0 }; +static const char *pager_search_list[] = { "pager", "more", "less", 0 }; static const char *pager_dir_list[] = { "/usr/bin", "/bin", 0 }; static const char *find_pager(char *buf) -- 2.11.0