From 7caaf6c9c9fb792610877f23bed813dfad992eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sun, 7 Dec 2003 17:40:00 +0000 Subject: [PATCH] Minor whitespace and style issues. --- sys/fs/procfs/procfs.c | 13 +++++-------- sys/fs/procfs/procfs_ctl.c | 2 +- sys/fs/procfs/procfs_ioctl.c | 2 +- sys/fs/procfs/procfs_map.c | 6 +++--- sys/fs/procfs/procfs_rlimit.c | 3 +-- sys/fs/procfs/procfs_status.c | 6 +++--- sys/fs/procfs/procfs_type.c | 5 ++--- 7 files changed, 16 insertions(+), 21 deletions(-) diff --git a/sys/fs/procfs/procfs.c b/sys/fs/procfs/procfs.c index cec4df125d4..b950b584034 100644 --- a/sys/fs/procfs/procfs.c +++ b/sys/fs/procfs/procfs.c @@ -93,7 +93,6 @@ procfs_docurproc(PFS_FILL_ARGS) int procfs_attr(PFS_ATTR_ARGS) { - PROC_LOCK_ASSERT(p, MA_OWNED); /* XXX inefficient, split into separate functions */ @@ -111,7 +110,7 @@ procfs_attr(PFS_ATTR_ARGS) vap->va_uid = p->p_ucred->cr_uid; vap->va_gid = p->p_ucred->cr_gid; - + return (0); } @@ -134,8 +133,7 @@ int procfs_candebug(PFS_VIS_ARGS) { PROC_LOCK_ASSERT(p, MA_OWNED); - return ((p->p_flag & P_SYSTEM) == 0 && - p_candebug(td, p) == 0); + return ((p->p_flag & P_SYSTEM) == 0 && p_candebug(td, p) == 0); } /* @@ -152,7 +150,7 @@ procfs_init(PFS_INIT_ARGS) pfs_create_link(root, "curproc", procfs_docurproc, NULL, NULL, 0); - + dir = pfs_create_dir(root, "pid", procfs_attr, NULL, PFS_PROCDEP); pfs_create_file(dir, "cmdline", procfs_doproccmdline, @@ -181,10 +179,10 @@ procfs_init(PFS_INIT_ARGS) NULL, NULL, PFS_RD); pfs_create_file(dir, "status", procfs_doprocstatus, NULL, NULL, PFS_RD); - + pfs_create_link(dir, "file", procfs_doprocfile, NULL, procfs_notsystem, 0); - + return (0); } @@ -194,7 +192,6 @@ procfs_init(PFS_INIT_ARGS) static int procfs_uninit(PFS_INIT_ARGS) { - /* nothing to do, pseudofs will GC */ return (0); } diff --git a/sys/fs/procfs/procfs_ctl.c b/sys/fs/procfs/procfs_ctl.c index ecc832138aa..0cc0ce2d457 100644 --- a/sys/fs/procfs/procfs_ctl.c +++ b/sys/fs/procfs/procfs_ctl.c @@ -246,7 +246,7 @@ out: /* * Step. Let the target process execute a single instruction. - * What does it mean to single step a threaded program? + * What does it mean to single step a threaded program? */ case PROCFS_CTL_STEP: PROC_UNLOCK(p); diff --git a/sys/fs/procfs/procfs_ioctl.c b/sys/fs/procfs/procfs_ioctl.c index 3f037671d4c..8b90da6b7b1 100644 --- a/sys/fs/procfs/procfs_ioctl.c +++ b/sys/fs/procfs/procfs_ioctl.c @@ -112,7 +112,7 @@ procfs_ioctl(PFS_IOCTL_ARGS) error = (ENOTTY); } PROC_UNLOCK(p); - + return (error); } diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c index 03332b32958..8fdae1a7486 100644 --- a/sys/fs/procfs/procfs_map.c +++ b/sys/fs/procfs/procfs_map.c @@ -95,7 +95,7 @@ procfs_doprocmap(PFS_FILL_ARGS) if (uio->uio_offset != 0) return (0); - + error = 0; if (map != &curthread->td_proc->p_vmspace->vm_map) vm_map_lock_read(map); @@ -150,7 +150,7 @@ procfs_doprocmap(PFS_FILL_ARGS) type = "device"; break; } - + flags = obj->flags; ref_count = obj->ref_count; shadow_count = obj->shadow_count; @@ -191,6 +191,6 @@ procfs_doprocmap(PFS_FILL_ARGS) } if (map != &curthread->td_proc->p_vmspace->vm_map) vm_map_unlock_read(map); - + return (error); } diff --git a/sys/fs/procfs/procfs_rlimit.c b/sys/fs/procfs/procfs_rlimit.c index aecfb071609..396c079c419 100644 --- a/sys/fs/procfs/procfs_rlimit.c +++ b/sys/fs/procfs/procfs_rlimit.c @@ -69,7 +69,7 @@ procfs_doprocrlimit(PFS_FILL_ARGS) sbuf_printf(sb, "%s ", rlimit_ident[i]); - /* + /* * Replace RLIM_INFINITY with -1 in the string */ @@ -98,4 +98,3 @@ procfs_doprocrlimit(PFS_FILL_ARGS) return (0); } - diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c index 69a0ae422e6..ac2434a0436 100644 --- a/sys/fs/procfs/procfs_status.c +++ b/sys/fs/procfs/procfs_status.c @@ -85,8 +85,8 @@ procfs_doprocstatus(PFS_FILL_ARGS) SESS_LOCK(sess); sid = sess->s_leader ? sess->s_leader->p_pid : 0; -/* comm pid ppid pgid sid maj,min ctty,sldr start ut st wmsg - euid ruid rgid,egid,groups[1 .. NGROUPS] +/* comm pid ppid pgid sid maj,min ctty,sldr start ut st wmsg + euid ruid rgid,egid,groups[1 .. NGROUPS] */ pc = p->p_comm; @@ -154,7 +154,7 @@ procfs_doprocstatus(PFS_FILL_ARGS) (u_long)cr->cr_ruid, (u_long)cr->cr_rgid); - /* egid (cr->cr_svgid) is equal to cr_ngroups[0] + /* egid (cr->cr_svgid) is equal to cr_ngroups[0] see also getegid(2) in /sys/kern/kern_prot.c */ for (i = 0; i < cr->cr_ngroups; i++) { diff --git a/sys/fs/procfs/procfs_type.c b/sys/fs/procfs/procfs_type.c index f164b672d28..86975ca3c42 100644 --- a/sys/fs/procfs/procfs_type.c +++ b/sys/fs/procfs/procfs_type.c @@ -51,11 +51,10 @@ procfs_doproctype(PFS_FILL_ARGS) { static const char *none = "Not Available"; - if (p && p->p_sysent && p->p_sysent->sv_name) { + if (p != NULL && p->p_sysent && p->p_sysent->sv_name) sbuf_printf(sb, p->p_sysent->sv_name); - } else { + else sbuf_printf(sb, none); - } sbuf_putc(sb, '\n'); return (0); }