X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=src%2Fbox.c;h=cc780cd2c174cbc04c622830dc84160b9099bccc;hb=4d52eeffe7f6bcf2bcd16f073aed7aca1ae968a5;hp=b72c0595b01309efd0eaa6c5d865d48c2388f3ce;hpb=81f60f3c309cf87db8a5ffcb320d181e8c3f99e2;p=eval.git diff --git a/src/box.c b/src/box.c index b72c059..cc780cd 100644 --- a/src/box.c +++ b/src/box.c @@ -78,7 +78,7 @@ die(char *msg, ...) } static void __attribute__((format(printf,1,2))) -log(char *msg, ...) +msg(char *msg, ...) { va_list args; va_start(args, msg); @@ -132,7 +132,7 @@ valid_filename(unsigned long addr) } while (*p++); - log("[%s] ", namebuf); + msg("[%s] ", namebuf); if (file_access >= 3) return; if (!strchr(namebuf, '/') && strcmp(namebuf, "..")) @@ -421,10 +421,10 @@ boxkeeper(void) die("ptrace(PTRACE_GETREGS): %m"); stop_count++; if (!stop_count) /* Traceme request */ - log(">> Traceme request caught\n"); + msg(">> Traceme request caught\n"); else if (stop_count & 1) /* Syscall entry */ { - log(">> Syscall %3ld (%08lx,%08lx,%08lx) ", u.regs.orig_eax, u.regs.ebx, u.regs.ecx, u.regs.edx); + msg(">> Syscall %3ld (%08lx,%08lx,%08lx) ", u.regs.orig_eax, u.regs.ebx, u.regs.ecx, u.regs.edx); syscall_count++; if (!valid_syscall(&u)) { @@ -441,12 +441,12 @@ boxkeeper(void) } } else /* Syscall return */ - log("= %ld\n", u.regs.eax); + msg("= %ld\n", u.regs.eax); ptrace(PTRACE_SYSCALL, box_pid, 0, 0); } else if (sig != SIGSTOP && sig != SIGXCPU && sig != SIGXFSZ) { - log(">> Signal %d\n", sig); + msg(">> Signal %d\n", sig); ptrace(PTRACE_SYSCALL, box_pid, 0, sig); } else