mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-09 13:42:56 +00:00
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:
parent
bade32af70
commit
7a14354549
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153236
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user