Minor whitespace and style issues.

This commit is contained in:
Dag-Erling Smørgrav 2003-12-07 17:40:00 +00:00
parent 3f907e34d7
commit 7caaf6c9c9
7 changed files with 16 additions and 21 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -112,7 +112,7 @@ procfs_ioctl(PFS_IOCTL_ARGS)
error = (ENOTTY);
}
PROC_UNLOCK(p);
return (error);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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++) {

View File

@ -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);
}