summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pl
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-12-04 16:31:28 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-12-04 16:31:28 +0000
commitaa3ecc4b30012d4412e1f8e73dd648bf5180fda2 (patch)
treea2e203deed251078571230cd460a4e8e2753e46e /perl-install/c/stuff.xs.pl
parent95ec1de873e73a8a26d1229c0d43a65b21416ec1 (diff)
downloaddrakx-backup-do-not-use-aa3ecc4b30012d4412e1f8e73dd648bf5180fda2.tar
drakx-backup-do-not-use-aa3ecc4b30012d4412e1f8e73dd648bf5180fda2.tar.gz
drakx-backup-do-not-use-aa3ecc4b30012d4412e1f8e73dd648bf5180fda2.tar.bz2
drakx-backup-do-not-use-aa3ecc4b30012d4412e1f8e73dd648bf5180fda2.tar.xz
drakx-backup-do-not-use-aa3ecc4b30012d4412e1f8e73dd648bf5180fda2.zip
log_message in drakx mode is better when logged for real
Diffstat (limited to 'perl-install/c/stuff.xs.pl')
-rw-r--r--perl-install/c/stuff.xs.pl25
1 files changed, 24 insertions, 1 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index 2e80b0998..68efef0a2 100644
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -112,7 +112,30 @@ void initIMPS2() {
tcdrain(fd);
}
-void log_message(const char * s, ...) {}
+void log_message(const char * s, ...) {
+ va_list args;
+ va_list args_copy;
+ FILE * logtty = fopen("/dev/tty3", "w");
+ if (!logtty)
+ return;
+ fprintf(logtty, "* ");
+ va_start(args, s);
+ vfprintf(logtty, s, args);
+ fprintf(logtty, "\n");
+ fclose(logtty);
+ va_end(args);
+
+ logtty = fopen("/tmp/ddebug.log", "a");
+ if (!logtty)
+ return;
+ fprintf(logtty, "* ");
+ va_copy(args_copy, args);
+ va_start(args_copy, s);
+ vfprintf(logtty, s, args_copy);
+ fprintf(logtty, "\n");
+ fclose(logtty);
+ va_end(args_copy);
+}
';