diff options
author | simonb <simonb> | 2000-06-26 14:11:50 +0000 |
---|---|---|
committer | simonb <simonb> | 2000-06-26 14:11:50 +0000 |
commit | dbd5bec279f7affd2095abb02f65301db72c9c2a (patch) | |
tree | 81651c6c0386afb3894de79eb511e51e8447fb4b /sysutils/skill | |
parent | d75d60fdd350a6d315019ed08f91832c03dd693e (diff) | |
download | pkgsrc-dbd5bec279f7affd2095abb02f65301db72c9c2a.tar.gz |
Mainly cosmetic changes from previous:
+ move includes files from middle of bsd-44.c module to top.
+ remove unused variables.
Diffstat (limited to 'sysutils/skill')
-rw-r--r-- | sysutils/skill/files/patch-sum | 4 | ||||
-rw-r--r-- | sysutils/skill/patches/patch-ab | 98 |
2 files changed, 75 insertions, 27 deletions
diff --git a/sysutils/skill/files/patch-sum b/sysutils/skill/files/patch-sum index ec488004567..985803e7e4c 100644 --- a/sysutils/skill/files/patch-sum +++ b/sysutils/skill/files/patch-sum @@ -1,4 +1,4 @@ -$NetBSD: patch-sum,v 1.5 2000/06/26 07:54:42 simonb Exp $ +$NetBSD: patch-sum,v 1.6 2000/06/26 14:11:50 simonb Exp $ MD5 (patch-aa) = c650e9348d22bb07487b0bf9b4e5c599 -MD5 (patch-ab) = 2884b29a7d91bc52d190fa669127f082 +MD5 (patch-ab) = 6b49102807a8eba6ed72f89c73af1bc7 diff --git a/sysutils/skill/patches/patch-ab b/sysutils/skill/patches/patch-ab index da1b40f86d7..27e1a22b078 100644 --- a/sysutils/skill/patches/patch-ab +++ b/sysutils/skill/patches/patch-ab @@ -1,23 +1,36 @@ -$NetBSD: patch-ab,v 1.5 2000/06/26 07:54:42 simonb Exp $ - --- machdep/bsd-44.c.orig Sun Feb 20 07:37:39 2000 -+++ machdep/bsd-44.c Fri Jun 23 13:33:09 2000 -@@ -135,9 +135,6 @@ - * Now, set up everything we need to write a GetProc() routine. - */ - --#include <kvm.h> --#include <fcntl.h> -- - #if defined(BSD4_4) && (BSD < 199306) - #include <sys/kinfo.h> - #include <sys/kinfo_proc.h> -@@ -155,8 +152,28 @@ - static char *pidmap[] = { "swapper", "init", "pagedaemon" }; - static int pidmapsiz = sizeof(pidmap) / sizeof(pidmap[0]); ++++ machdep/bsd-44.c Tue Jun 27 00:03:39 2000 +@@ -23,11 +23,54 @@ + #endif + #endif --#define PROC(kprocp) kprocp->kp_proc --#define EPROC(kprocp) kprocp->kp_eproc ++#if defined(BSD4_4) && (BSD < 199306) ++#include <sys/kinfo.h> ++#include <sys/kinfo_proc.h> ++#define _ALLPROCFLAG KINFO_PROC_ALL ++#else ++#include <sys/sysctl.h> ++#include <limits.h> ++#define _ALLPROCFLAG KERN_PROC_ALL ++#endif ++ + #include <sys/resource.h> ++#include <err.h> ++#include <signal.h> + #include <stdio.h> +-#include <unistd.h> ++#include <stdlib.h> + #include <string.h> +-#include <signal.h> ++#include <unistd.h> ++ ++#ifndef P_WEXIT /* backward compatibility */ ++#define P_WEXIT SWEXIT ++#endif ++ ++static char *pidmap[] = { "swapper", "init", "pagedaemon" }; ++static int pidmapsiz = sizeof(pidmap) / sizeof(pidmap[0]); ++ +#ifdef KERN_PROC2 +#define CMDLEN KI_MAXCOMLEN +#define PROCTYPE struct kinfo_proc2 @@ -40,21 +53,56 @@ $NetBSD: patch-ab,v 1.5 2000/06/26 07:54:42 simonb Exp $ +#define PROC_TDEV(kprocp) kprocp->kp_eproc.e_tdev +#define PROC_UID(kprocp) kprocp->kp_eproc.e_ucred.cr_uid +#endif ++ + + /* + * Define SigNames, NSig, and TtyDevDir here; they are used by other +@@ -132,33 +175,6 @@ + } /* +- * Now, set up everything we need to write a GetProc() routine. +- */ +- +-#include <kvm.h> +-#include <fcntl.h> +- +-#if defined(BSD4_4) && (BSD < 199306) +-#include <sys/kinfo.h> +-#include <sys/kinfo_proc.h> +-#define _ALLPROCFLAG KINFO_PROC_ALL +-#else +-#include <sys/sysctl.h> +-#include <limits.h> +-#define _ALLPROCFLAG KERN_PROC_ALL +-#endif +- +-#ifndef P_WEXIT /* backward compatibility */ +-#define P_WEXIT SWEXIT +-#endif +- +-static char *pidmap[] = { "swapper", "init", "pagedaemon" }; +-static int pidmapsiz = sizeof(pidmap) / sizeof(pidmap[0]); +- +-#define PROC(kprocp) kprocp->kp_proc +-#define EPROC(kprocp) kprocp->kp_eproc +- +-/* * GetProc() -@@ -169,54 +186,59 @@ + * + * Fill in and return a `struct ProcInfo' with information about the +@@ -169,54 +185,54 @@ { static struct ProcInfo procinfo; static int nproc = -1; - static struct kinfo_proc *aproc; - static kvm_t *kd = NULL; +-#ifdef _POSIX2_LINE_MAX +- char errbuf[_POSIX2_LINE_MAX]; +-#else +- char errbuf[2048]; +-#endif + static PROCTYPE *aproc; - #ifdef _POSIX2_LINE_MAX - char errbuf[_POSIX2_LINE_MAX]; - #else - char errbuf[2048]; - #endif + int mib[6]; + size_t size; @@ -127,7 +175,7 @@ $NetBSD: patch-ab,v 1.5 2000/06/26 07:54:42 simonb Exp $ static char *exiting = "<exiting>"; procinfo.pi_flags |= PI_SWEXIT; procinfo.pi_cmd = exiting; -@@ -228,22 +250,22 @@ +@@ -228,22 +244,22 @@ return(&procinfo); } } |