mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 16:34:45 +07:00
Drop confusing splash cmdline and --enable-progress configure option
This patch reverts back to the progress/status behavior of Finit < v3.0 because this is what most users expect, including the maintainer. The resulting code and configure script is a lot simpler to understand and maintain: - No more --enable-progress or --enable-progress-classic configure flags. Instead a progress_style variable in helpers.c that can be changed at compile time for those that really need it. - No more 'splash' kernel commnand line option. This turned out to be *very* confusing to many users who believed it was some sort of graphical splash screen à la Plymouth. Also, when Finit debug is enabled we now have a global 'debug' flag which now alo controls if klogctl() should be called to prevent the kernel logs to the console or not. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+3
-3
@@ -172,7 +172,7 @@ int run_interactive(char *cmd, char *fmt, ...)
|
||||
|
||||
/* Redirect output from cmd to a tempfile */
|
||||
fp = tempfile();
|
||||
if (fp && !log_is_debug()) {
|
||||
if (fp && !debug) {
|
||||
oldout = dup(STDOUT_FILENO);
|
||||
olderr = dup(STDERR_FILENO);
|
||||
dup2(fileno(fp), STDOUT_FILENO);
|
||||
@@ -183,7 +183,7 @@ int run_interactive(char *cmd, char *fmt, ...)
|
||||
status = run(cmd);
|
||||
|
||||
/* Restore stderr/stdout */
|
||||
if (fp && !log_is_debug()) {
|
||||
if (fp && !debug) {
|
||||
if (oldout >= 0) {
|
||||
dup2(oldout, STDOUT_FILENO);
|
||||
close(oldout);
|
||||
@@ -198,7 +198,7 @@ int run_interactive(char *cmd, char *fmt, ...)
|
||||
print_result(status);
|
||||
|
||||
/* Dump any results of cmd on stderr after we've printed [ OK ] or [FAIL] */
|
||||
if (fp && !log_is_debug()) {
|
||||
if (fp && !debug) {
|
||||
size_t len, written;
|
||||
|
||||
rewind(fp);
|
||||
|
||||
Reference in New Issue
Block a user