diff options
author | glebius <glebius@FreeBSD.org> | 2005-12-08 13:33:57 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-12-08 13:33:57 +0000 |
commit | d6ef4fe5b252612d44020eecf6e3feb9b8233dd5 (patch) | |
tree | 2e97cecb4edc8ddb4755a191e6e3c4c8671f1a32 /sys/compat/linux/linux_util.h | |
parent | cb090e138663a54857f723eccef8f149d3c0732b (diff) | |
download | FreeBSD-src-d6ef4fe5b252612d44020eecf6e3feb9b8233dd5.zip FreeBSD-src-d6ef4fe5b252612d44020eecf6e3feb9b8233dd5.tar.gz |
Suppress logging about unimplemented syscalls to one time per process. This
prevents hard flood of the system console.
Reviewed by: bde
Diffstat (limited to 'sys/compat/linux/linux_util.h')
-rw-r--r-- | sys/compat/linux/linux_util.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index 6aad44d..49a535d 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -97,19 +97,17 @@ int linux_emul_convpath(struct thread *, char *, enum uio_seg, char **, int); int \ linux_ ## s(struct thread *td, struct linux_ ## s ## _args *args) \ { \ - return (unimplemented_syscall(td, #s)); \ + static pid_t pid; \ + \ + if (pid != td->td_proc->p_pid) { \ + linux_msg(td, "syscall %s not implemented", #s); \ + pid = td->td_proc->p_pid; \ + }; \ + return (ENOSYS); \ } \ struct __hack void linux_msg(const struct thread *td, const char *fmt, ...) __printflike(2, 3); -static __inline int -unimplemented_syscall(struct thread *td, const char *syscallname) -{ - - linux_msg(td, "syscall %s not implemented", syscallname); - return (ENOSYS); -} - #endif /* !_LINUX_UTIL_H_ */ |