From owner-freebsd-ports Tue Jun 6 00:28:00 1995 Return-Path: ports-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id AAA06734 for ports-outgoing; Tue, 6 Jun 1995 00:28:00 -0700 Received: from lirmm.lirmm.fr (lirmm.lirmm.fr [193.49.104.10]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id AAA06706 for ; Tue, 6 Jun 1995 00:26:48 -0700 Received: from lirmm.fr (baobab.lirmm.fr [193.49.106.14]) by lirmm.lirmm.fr (8.6.10/8.6.4) with ESMTP id JAA06138 for ; Tue, 6 Jun 1995 09:26:38 +0200 Message-Id: <199506060726.JAA06138@lirmm.lirmm.fr> To: ports@FreeBSD.org Subject: top & swap. Date: Tue, 06 Jun 1995 09:26:14 +0200 From: "Philippe Charnier" Sender: ports-owner@FreeBSD.org Precedence: bulk Hello, I think I found something strange in the top-3.3 directory, and maybe the reason why swap is not displayed correctly. patch-ab was patching work/machine/m_freebsd20.c but the file files/machine.c was used instead (with another patch applied but without patch-ab in). the fix is - remove files/machine.c (patch-ab now contains the 2 patches). - replace patch-ab with the new one. - replace scripts/post-configure (the new one simply copy work/machine/m_freebsd20.c into work/machine.c instead of using files/machine.c). ===================================== post-configure #!/bin/sh # # $Id: post-configure,v 1.3 1995/01/04 19:31:43 swallace Exp $ # cp -f ${CURDIR}/files/Makefile ${WRKSRC} cp -f ${CURDIR}/files/top.local.h ${WRKSRC} cp -f ${CURDIR}/files/top.1 ${WRKSRC} cp -f ${WRKSRC}/machine/m_freebsd20.c ${WRKSRC}/machine.c ===================================== patch-ab *** machine/m_freebsd20.c.orig Mon Jun 5 16:42:38 1995 --- machine/m_freebsd20.c Mon Jun 5 16:44:53 1995 *************** *** 157,163 **** char *state_abbrev[] = { ! "", "start", "run\0\0\0", "sleep", "stop", "zomb", "WAIT" }; --- 157,163 ---- char *state_abbrev[] = { ! "", "start", "run\0\0\0", "sleep", "stop", "zomb", }; *************** *** 192,201 **** /* these are for detailing the process states */ ! int process_states[7]; char *procstatenames[] = { "", " starting, ", " running, ", " sleeping, ", " stopped, ", ! " zombie, ", " ABANDONED, ", NULL }; --- 192,201 ---- /* these are for detailing the process states */ ! int process_states[6]; char *procstatenames[] = { "", " starting, ", " running, ", " sleeping, ", " stopped, ", ! " zombie, ", NULL }; *************** *** 816,821 **** --- 816,822 ---- int i, div, avail, nfree, npfree, used; struct swdevt *sw; long blocksize, *perdev; + u_long ptr; struct rlist head; struct rlist *swaplist; *************** *** 826,832 **** if ((sw = (struct swdevt *)malloc(nswdev * sizeof(*sw))) == NULL || (perdev = (long *)malloc(nswdev * sizeof(*perdev))) == NULL) err(1, "malloc"); ! KGET1(VM_SWDEVT, sw, nswdev * sizeof(*sw), "swdevt"); /* Count up swap space. */ nfree = 0; --- 827,834 ---- if ((sw = (struct swdevt *)malloc(nswdev * sizeof(*sw))) == NULL || (perdev = (long *)malloc(nswdev * sizeof(*perdev))) == NULL) err(1, "malloc"); ! KGET1(VM_SWDEVT, &ptr, sizeof ptr, "swdevt"); ! KGET2(ptr, sw, nswdev * sizeof(*sw), "*swdevt"); /* Count up swap space. */ nfree = 0; -------- -------- Philippe Charnier charnier@lirmm.fr LIRMM, 161 rue Ada, 34392 Montpellier cedex 5 -- France ------------------------------------------------------------------------