diff options
author | des <des@FreeBSD.org> | 2003-12-07 17:40:00 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-12-07 17:40:00 +0000 |
commit | 0864edfb363abcb91a441a52e655e2bfbd843979 (patch) | |
tree | 2af3ec489693a758cdf6ac84e5ed0aa5117a5e28 /sys/fs/procfs | |
parent | 98e94a9c109c9c441eee4e236a0116b1197ddc19 (diff) | |
download | FreeBSD-src-0864edfb363abcb91a441a52e655e2bfbd843979.zip FreeBSD-src-0864edfb363abcb91a441a52e655e2bfbd843979.tar.gz |
Minor whitespace and style issues.
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r-- | sys/fs/procfs/procfs.c | 13 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_ctl.c | 2 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_ioctl.c | 2 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_map.c | 6 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_rlimit.c | 3 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_status.c | 6 | ||||
-rw-r--r-- | 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 cec4df1..b950b58 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 ecc8321..0cc0ce2 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 3f03767..8b90da6 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 03332b3..8fdae1a 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 aecfb07..396c079 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 69a0ae4..ac2434a 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 f164b67..86975ca 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); } |