summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-12-08 13:33:57 +0000
committerglebius <glebius@FreeBSD.org>2005-12-08 13:33:57 +0000
commitd6ef4fe5b252612d44020eecf6e3feb9b8233dd5 (patch)
tree2e97cecb4edc8ddb4755a191e6e3c4c8671f1a32 /sys/compat
parentcb090e138663a54857f723eccef8f149d3c0732b (diff)
downloadFreeBSD-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')
-rw-r--r--sys/compat/linux/linux_util.h16
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_ */
OpenPOWER on IntegriCloud