summaryrefslogtreecommitdiff
path: root/misc/logsave.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-18Shorten compile commands run by the build systemTheodore Ts'o1-0/+1
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and this was starting to cause some tools heartburn. It also made "make V=1" almost useless, since trying to following the individual commands run by make was lost in the noise of all of the defines. So fix this by putting the configure-generated defines in lib/config.h and the directory pathnames to lib/dirpaths.h. In addition, clean up some vestigal defines in configure.in and in the Makefiles to further shorten the cc command lines. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-16e2fsprogs: Don't try to close an fd which is negativeEric Sandeen1-1/+2
These reflect either file descriptors which aren't tested for failure, or closures of fd's which may have failed. In setup_tdb(), test for failure of mkstemp and return without trying to open the file (again). In reserve_stdio_fds, rather than closing the "extra" fd == 3 due to the way the loop is written, just don't go that far by using while (fd <= 2). In logsave, it forks and retries forever if open fails, but at least make coverity happy by explicitly not trying to close a negative file descriptor. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-05-07logsave: Update usage message so it is correctCarsten Hey1-1/+1
Addresses-Debian-Bug: #619788 Signed-off-by: Carsten Hey <carsten@debian.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-06-29logsave: Don't send the ^A and ^B delimiters to the consoleTheodore Ts'o1-3/+22
Some terminal programs may print wierd characters when they see the \001 or \002 characters. So filter them out if the -s option (skip_mode) is enabled. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-22logsave: Fix warn_unused_result warnings from gccTheodore Ts'o1-3/+26
Fixed a potential bug where by partial returns from the write(2) system call could some bytes to be lost when writing to the log file. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27Remove trailing whitespace for the entire source treeTheodore Ts'o1-10/+10
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13Define _XOPEN_SOURCE to 600 consistently for Solaris C99 supportTheodore Ts'o1-0/+2
Solaris's header files are very picky about which C compiler can be used for SUSv3 conformance. Use of C99 is not compatible with SUSv2 (_XOPEN_SOURCE=500), and C89 is not compatible with SUSv3 (_XOPEN_SOURCE=600). Since we need some SUSv3 functions, consistently use SUSv3 so that e2fsprogs will build on Solaris using c99. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-27logsave: Pass any SIGTERM or SIGINT signals to child processTheodore Ts'o1-0/+25
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2004-03-04logsave.c (main): Use setsid() to avoid getting killed by initTheodore Ts'o1-2/+3
(run_program): Add a newline after reporting the exit code or signal when the program exits.
2003-04-16 * Add support for the -a and -s options to logsave.Theodore Ts'o1-36/+82
* Change e2fsck to bracket its progress bar output with ctrl-A and ctrl-B characters, so that logsave -s can omit writing the progress bar output to the log file.
2003-04-14Add logsave, a new program which saves the output of a commandTheodore Ts'o1-0/+215
in a log file, even if the containing directory hasn't been mounted yet (in which case the it saves the output in memory until it can write out the logfile).