MFC 1.26:

Suppress logging about unimplemented syscalls to one time per process. This
  prevents hard flood of the system console.

  Reviewed by:	bde
This commit is contained in:
glebius 2005-12-19 17:06:51 +00:00
parent fa6896f870
commit 5b6819c0d6

View File

@ -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_ */