Deleted Added
full compact
procfs_status.c (96886) procfs_status.c (103767)
1/*
2 * Copyright (c) 1993 Jan-Simon Pendry
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

--- 24 unchanged lines hidden (view full) ---

33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
38 *
39 * From:
40 * $Id: procfs_status.c,v 3.1 1993/12/15 09:40:17 jsp Exp $
1/*
2 * Copyright (c) 1993 Jan-Simon Pendry
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

--- 24 unchanged lines hidden (view full) ---

33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94
38 *
39 * From:
40 * $Id: procfs_status.c,v 3.1 1993/12/15 09:40:17 jsp Exp $
41 * $FreeBSD: head/sys/fs/procfs/procfs_status.c 96886 2002-05-19 00:14:50Z jhb $
41 * $FreeBSD: head/sys/fs/procfs/procfs_status.c 103767 2002-09-21 22:07:17Z jake $
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/exec.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>
49#include <sys/jail.h>
50#include <sys/malloc.h>
51#include <sys/mutex.h>
52#include <sys/sx.h>
53#include <sys/proc.h>
54#include <sys/resourcevar.h>
55#include <sys/sbuf.h>
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/exec.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>
49#include <sys/jail.h>
50#include <sys/malloc.h>
51#include <sys/mutex.h>
52#include <sys/sx.h>
53#include <sys/proc.h>
54#include <sys/resourcevar.h>
55#include <sys/sbuf.h>
56#include <sys/sysent.h>
56#include <sys/tty.h>
57
58#include <vm/vm.h>
59#include <vm/pmap.h>
60#include <vm/vm_param.h>
61
62#include <fs/pseudofs/pseudofs.h>
63#include <fs/procfs/procfs.h>

--- 122 unchanged lines hidden (view full) ---

186 sbuf_bcpy(sb, p->p_args->ar_args, p->p_args->ar_length);
187 PROC_UNLOCK(p);
188 return (0);
189 }
190 PROC_UNLOCK(p);
191 if (p != td->td_proc) {
192 sbuf_printf(sb, "%.*s", MAXCOMLEN, p->p_comm);
193 } else {
57#include <sys/tty.h>
58
59#include <vm/vm.h>
60#include <vm/pmap.h>
61#include <vm/vm_param.h>
62
63#include <fs/pseudofs/pseudofs.h>
64#include <fs/procfs/procfs.h>

--- 122 unchanged lines hidden (view full) ---

187 sbuf_bcpy(sb, p->p_args->ar_args, p->p_args->ar_length);
188 PROC_UNLOCK(p);
189 return (0);
190 }
191 PROC_UNLOCK(p);
192 if (p != td->td_proc) {
193 sbuf_printf(sb, "%.*s", MAXCOMLEN, p->p_comm);
194 } else {
194 error = copyin((void*)PS_STRINGS, &pstr, sizeof(pstr));
195 error = copyin((void *)p->p_sysent->sv_psstrings, &pstr,
196 sizeof(pstr));
195 if (error)
196 return (error);
197 for (i = 0; i < pstr.ps_nargvstr; i++) {
198 sbuf_copyin(sb, pstr.ps_argvstr[i], 0);
199 sbuf_printf(sb, "%c", '\0');
200 }
201 }
202
203 return (0);
204}
197 if (error)
198 return (error);
199 for (i = 0; i < pstr.ps_nargvstr; i++) {
200 sbuf_copyin(sb, pstr.ps_argvstr[i], 0);
201 sbuf_printf(sb, "%c", '\0');
202 }
203 }
204
205 return (0);
206}