diff options
author | Sergey Matveychuk <sem@FreeBSD.org> | 2005-10-06 10:57:46 +0000 |
---|---|---|
committer | Sergey Matveychuk <sem@FreeBSD.org> | 2005-10-06 10:57:46 +0000 |
commit | 79c506a76d6cdf342e00dfda0eacbc44b41ce2b0 (patch) | |
tree | 1d02a44f017b34840d263ef399a9dda5a617af64 /sysutils/and | |
parent | ea7c0978ec9b22df82fac4604a498a7b09f9ffd3 (diff) |
Notes
Diffstat (limited to 'sysutils/and')
-rw-r--r-- | sysutils/and/Makefile | 10 | ||||
-rw-r--r-- | sysutils/and/files/patch-and-OpenBSD.c | 37 |
2 files changed, 16 insertions, 31 deletions
diff --git a/sysutils/and/Makefile b/sysutils/and/Makefile index 5e4ecb924016..861a6fd586ae 100644 --- a/sysutils/and/Makefile +++ b/sysutils/and/Makefile @@ -8,7 +8,7 @@ PORTNAME= and PORTVERSION= 1.0.9 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -23,10 +23,4 @@ NOPRECIOUSMAKEVARS= yes MAN5= and.conf.5 and.priorities.5 MAN8= and.8 -.include <bsd.port.pre.mk> - -.if ${OSVERSION} > 500014 -BROKEN= "Not functional due kernel changes >= 5.x" -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/sysutils/and/files/patch-and-OpenBSD.c b/sysutils/and/files/patch-and-OpenBSD.c index d0103b0ed05f..5bb60a5c69d2 100644 --- a/sysutils/and/files/patch-and-OpenBSD.c +++ b/sysutils/and/files/patch-and-OpenBSD.c @@ -1,37 +1,28 @@ ---- and-OpenBSD.c.orig Mon Jan 28 01:02:51 2002 -+++ and-OpenBSD.c Sat Dec 21 02:04:58 2002 -@@ -91,17 +91,38 @@ +--- and-OpenBSD.c.orig Sun Jan 27 18:52:18 2002 ++++ and-OpenBSD.c Thu Oct 6 14:51:53 2005 +@@ -91,6 +91,21 @@ abort(); } if (openbsd_next >= openbsd_nproc) return NULL; ++ +#if defined(__FreeBSD__) && __FreeBSD_version >= 500014 ++ /* Skip kernel threads */ ++ while((openbsd_pt[openbsd_next].ki_flag & P_KTHREAD) ++ && openbsd_next < openbsd_nproc) ++ openbsd_next++; ++ if (openbsd_next >= openbsd_nproc) return NULL; + strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].ki_comm,1023); -+#else - strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].kp_proc.p_comm,1023); -+#endif - openbsd_proc.command[1023] = 0; -+#if defined(__FreeBSD__) && __FreeBSD_version >= 500014 ++ openbsd_proc.command[1023] = 0; + openbsd_proc.pid = openbsd_pt[openbsd_next].ki_pid; + openbsd_proc.nice = openbsd_pt[openbsd_next].ki_nice-20; + openbsd_proc.uid = openbsd_pt[openbsd_next].ki_ruid; + openbsd_proc.gid = openbsd_pt[openbsd_next].ki_rgid; ++ openbsd_proc.utime = (openbsd_pt[openbsd_next].ki_runtime+500000)/1000000; +#else + strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].kp_proc.p_comm,1023); + openbsd_proc.command[1023] = 0; openbsd_proc.pid = openbsd_pt[openbsd_next].kp_proc.p_pid; - openbsd_proc.nice = openbsd_pt[openbsd_next].kp_proc.p_nice-20; - openbsd_proc.uid = openbsd_pt[openbsd_next].kp_eproc.e_pcred.p_ruid; - openbsd_proc.gid = openbsd_pt[openbsd_next].kp_eproc.e_pcred.p_rgid; -+#endif - /* Adapted from top(1) port, as found in the misc@openbsd.org archive */ -+#if defined(__FreeBSD__) && __FreeBSD_version >= 500014 -+ /* XXX: Accessing ki_paddr causes sig10 ... -+ openbsd_proc.utime = (openbsd_pt[openbsd_next].ki_paddr->p_uticks + -+ openbsd_pt[openbsd_next].ki_paddr->p_sticks + -+ openbsd_pt[openbsd_next].ki_paddr->p_iticks) -+ / openbsd_hz; -+ */ -+ openbsd_proc.utime = 0; -+#else - openbsd_proc.utime = (openbsd_pt[openbsd_next].kp_proc.p_uticks + +@@ -102,6 +117,7 @@ openbsd_pt[openbsd_next].kp_proc.p_sticks + openbsd_pt[openbsd_next].kp_proc.p_iticks) / openbsd_hz; |