diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-02-16 16:40:43 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-02-16 16:40:43 +0000 |
commit | 8c0f93bb9b66766fdbcc5b8376b17f0f904f31ec (patch) | |
tree | e8f1cb5e51cc135342198a8a62b8133cddb41a5d /sys/compat/linux/linux_stats.c | |
parent | e5e0087f912c6d7f6147cb560042f80ca5372af1 (diff) | |
download | FreeBSD-src-8c0f93bb9b66766fdbcc5b8376b17f0f904f31ec.zip FreeBSD-src-8c0f93bb9b66766fdbcc5b8376b17f0f904f31ec.tar.gz |
Allow debugging output to be controlled on a per-syscall granularity.
Also clean up debugging output in a slightly more uniform fashion.
The default behavior remains the same (all debugging output is turned on)
Diffstat (limited to 'sys/compat/linux/linux_stats.c')
-rw-r--r-- | sys/compat/linux/linux_stats.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index ee31b4f..cd53eda 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -149,8 +149,8 @@ linux_newstat(struct proc *p, struct linux_newstat_args *args) CHECKALTEXIST(p, &sg, args->path); #ifdef DEBUG - printf("Linux-emul(%ld): newstat(%s, *)\n", (long)p->p_pid, - args->path); + if (ldebug(newstat)) + printf(ARGS(newstat, "%s, *"), args->path); #endif NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | NOOBJ, UIO_USERSPACE, @@ -186,8 +186,8 @@ linux_newlstat(p, uap) CHECKALTEXIST(p, &sg, uap->path); #ifdef DEBUG - printf("Linux-emul(%ld): newlstat(%s, *)\n", (long)p->p_pid, - uap->path); + if (ldebug(newlstat)) + printf(ARGS(newlstat, "%s, *"), uap->path); #endif NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | NOOBJ, UIO_USERSPACE, @@ -217,7 +217,8 @@ linux_newfstat(struct proc *p, struct linux_newfstat_args *args) fdp = p->p_fd; #ifdef DEBUG - printf("Linux-emul(%ld): newfstat(%d, *)\n", (long)p->p_pid, args->fd); + if (ldebug(newfstat)) + printf(ARGS(newfstat, "%d, *"), args->fd); #endif if ((unsigned)args->fd >= fdp->fd_nfiles || @@ -308,7 +309,8 @@ linux_statfs(struct proc *p, struct linux_statfs_args *args) CHECKALTEXIST(p, &sg, args->path); #ifdef DEBUG - printf("Linux-emul(%d): statfs(%s, *)\n", p->p_pid, args->path); + if (ldebug(statfs)) + printf(ARGS(statfs, "%s, *"), args->path); #endif ndp = &nd; NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args->path, curproc); @@ -347,7 +349,8 @@ linux_fstatfs(struct proc *p, struct linux_fstatfs_args *args) int error; #ifdef DEBUG - printf("Linux-emul(%d): fstatfs(%d, *)\n", p->p_pid, args->fd); + if (ldebug(fstatfs)) + printf(ARGS(fstatfs, "%d, *"), args->fd); #endif error = getvnode(p->p_fd, args->fd, &fp); if (error) @@ -384,7 +387,8 @@ linux_ustat(p, uap) int error; #ifdef DEBUG - printf("Linux-emul(%ld): ustat(%d, *)\n", (long)p->p_pid, uap->dev); + if (ldebug(ustat)) + printf(ARGS(ustat, "%d, *"), uap->dev); #endif /* |