[PATCHv2,08/12] installer: Allow writing to the debug console from anywhere

Message ID 20240323105629.371511-8-stefan.schantl@ipfire.org
State Staged
Commit 8e3b022a831e06f9f1ab0340534778cdf0dc95d1
Headers
Series [PATCHv2,01/12] btrfs-progs: New package |

Commit Message

Stefan Schantl March 23, 2024, 10:56 a.m. UTC
  Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 src/installer/hw.c   | 2 ++
 src/installer/main.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
  

Patch

diff --git a/src/installer/hw.c b/src/installer/hw.c
index 3fa8b889e..ba6064cf5 100644
--- a/src/installer/hw.c
+++ b/src/installer/hw.c
@@ -44,6 +44,8 @@ 
 
 #include "hw.h"
 
+extern FILE* flog;
+
 static int system_chroot(const char* output, const char* path, const char* cmd) {
 	char chroot_cmd[STRING_SIZE];
 
diff --git a/src/installer/main.c b/src/installer/main.c
index 47daccdaa..30f02d8cb 100644
--- a/src/installer/main.c
+++ b/src/installer/main.c
@@ -29,6 +29,8 @@ 
 
 extern char url[STRING_SIZE];
 
+FILE* flog = NULL;
+
 static int newtChecklist(const char* title, const char* message,
 		unsigned int width, unsigned int height, unsigned int num_entries,
 		const char** entries, int* states) {
@@ -377,7 +379,6 @@  int main(int argc, char *argv[]) {
 	sethostname(DISTRO_SNAME, 10);
 
 	/* Log file/terminal stuff. */
-	FILE* flog = NULL;
 	if (argc >= 2) {
 		logfile = argv[1];