Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/minoura-xpg4dl]: src/usr.bin Sync w/ netbsd-1-5-base.
details: https://anonhg.NetBSD.org/src/rev/194247e47b72
branches: minoura-xpg4dl
changeset: 486695:194247e47b72
user: minoura <minoura%NetBSD.org@localhost>
date: Fri Jun 23 16:40:11 2000 +0000
description:
Sync w/ netbsd-1-5-base.
diffstat:
usr.bin/vi/vi/v_ex.c | 7 +-
usr.bin/vi/vi/vi.c | 3 +-
usr.bin/vi/vi/vs_msg.c | 5 +-
usr.bin/vmstat/dkstats.c | 34 ++++++--
usr.bin/vmstat/dkstats.h | 8 +-
usr.bin/vmstat/vmstat.8 | 46 +++++++++++-
usr.bin/vmstat/vmstat.c | 153 +++++++++++++++++++++++++++++-----------
usr.bin/w/w.c | 8 +-
usr.bin/xlint/lint1/cgram.y | 2 +-
usr.bin/xlint/lint1/decl.c | 2 +-
usr.bin/xlint/lint1/emit1.c | 2 +-
usr.bin/xlint/lint1/lint1.h | 2 +-
usr.bin/xlint/lint1/scan.l | 4 +-
usr.bin/xlint/lint2/chk.c | 4 +-
usr.bin/xlint/lint2/emit2.c | 4 +-
usr.bin/xlint/lint2/externs2.h | 2 +-
usr.bin/xlint/lint2/lint2.h | 2 +-
usr.bin/xlint/lint2/read.c | 4 +-
usr.bin/xlint/llib/Makefile | 6 +-
usr.bin/xlint/xlint/lint.1 | 2 +-
usr.bin/xlint/xlint/xlint.c | 4 +-
usr.bin/yacc/output.c | 8 +-
usr.bin/yacc/skeleton.c | 12 +-
usr.bin/ypwhich/ypwhich.1 | 2 +-
24 files changed, 227 insertions(+), 99 deletions(-)
diffs (truncated from 833 to 300 lines):
diff -r b9b077bf3049 -r 194247e47b72 usr.bin/vi/vi/v_ex.c
--- a/usr.bin/vi/vi/v_ex.c Fri Jun 23 16:30:10 2000 +0000
+++ b/usr.bin/vi/vi/v_ex.c Fri Jun 23 16:40:11 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: v_ex.c,v 1.8 1999/01/08 06:16:55 abs Exp $ */
+/* $NetBSD: v_ex.c,v 1.8.8.1 2000/06/23 16:40:11 minoura Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -66,12 +66,17 @@
SCR *sp;
VICMD *vp;
{
+ GS *gp;
+
+ gp = sp->gp;
+
/* Try and switch screens -- the screen may not permit it. */
if (sp->gp->scr_screen(sp, SC_EX)) {
msgq(sp, M_ERR,
"207|The Q command requires the ex terminal interface");
return (1);
}
+ (void)gp->scr_attr(sp, SA_ALTERNATE, 0);
/* Save the current cursor position. */
sp->frp->lno = sp->lno;
diff -r b9b077bf3049 -r 194247e47b72 usr.bin/vi/vi/vi.c
--- a/usr.bin/vi/vi/vi.c Fri Jun 23 16:30:10 2000 +0000
+++ b/usr.bin/vi/vi/vi.c Fri Jun 23 16:40:11 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vi.c,v 1.8 1998/01/09 08:08:48 perry Exp $ */
+/* $NetBSD: vi.c,v 1.8.8.1 2000/06/23 16:40:11 minoura Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -89,6 +89,7 @@
/* Initialize the vi screen. */
if (v_init(sp))
return (1);
+ (void)gp->scr_attr(sp, SA_ALTERNATE, 1);
for (vip = VIP(sp), rval = 0;;) {
/* Resolve messages. */
diff -r b9b077bf3049 -r 194247e47b72 usr.bin/vi/vi/vs_msg.c
--- a/usr.bin/vi/vi/vs_msg.c Fri Jun 23 16:30:10 2000 +0000
+++ b/usr.bin/vi/vi/vs_msg.c Fri Jun 23 16:40:11 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vs_msg.c,v 1.2 1998/01/09 08:08:51 perry Exp $ */
+/* $NetBSD: vs_msg.c,v 1.2.8.1 2000/06/23 16:40:11 minoura Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -620,6 +620,9 @@
if (F_ISSET(vip, VIP_N_EX_REDRAW))
F_SET(sp, SC_SCR_REFORMAT);
+ /* Ex may have switched out of the alternate screen, return. */
+ (void)gp->scr_attr(sp, SA_ALTERNATE, 1);
+
/*
* Whew. We're finally back home, after what feels like years.
* Kiss the ground.
diff -r b9b077bf3049 -r 194247e47b72 usr.bin/vmstat/dkstats.c
--- a/usr.bin/vmstat/dkstats.c Fri Jun 23 16:30:10 2000 +0000
+++ b/usr.bin/vmstat/dkstats.c Fri Jun 23 16:40:11 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dkstats.c,v 1.6 1998/08/10 03:11:08 perry Exp $ */
+/* $NetBSD: dkstats.c,v 1.6.8.1 2000/06/23 16:40:15 minoura Exp $ */
/*
* Copyright (c) 1996 John M. Vinopal
@@ -32,8 +32,10 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/sched.h>
#include <sys/dkstat.h>
+#include <sys/sysctl.h>
#include <sys/time.h>
#include <sys/disk.h>
@@ -53,15 +55,13 @@
{ "_tk_nin" }, /* tty characters in */
#define X_TK_NOUT 1
{ "_tk_nout" }, /* tty characters out */
-#define X_CP_TIME 2
- { "_cp_time" }, /* system timer ticks */
-#define X_HZ 3
+#define X_HZ 2
{ "_hz" }, /* ticks per second */
-#define X_STATHZ 4
+#define X_STATHZ 3
{ "_stathz" },
-#define X_DISK_COUNT 5
+#define X_DISK_COUNT 4
{ "_disk_count" }, /* number of disks */
-#define X_DISKLIST 6
+#define X_DISKLIST 5
{ "_disklist" }, /* TAILQ of disks */
{ NULL },
};
@@ -152,6 +152,8 @@
dkreadstats()
{
struct disk cur_disk, *p;
+ size_t ssize;
+ int mib[2];
int i;
p = dk_drivehead;
@@ -164,7 +166,21 @@
timerset(&(cur_disk.dk_time), &(cur.dk_time[i]));
p = cur_disk.dk_link.tqe_next;
}
- deref_nl(X_CP_TIME, cur.cp_time, sizeof(cur.cp_time));
+
+ /*
+ * XXX Need to locate the `correct' CPU when looking for this
+ * XXX in crash dumps. Just don't report it for now, in that
+ * XXX case.
+ */
+ ssize = sizeof(cur.cp_time);
+ memset(cur.cp_time, 0, ssize);
+ if (memf == NULL) {
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_CP_TIME;
+ if (sysctl(mib, 2, cur.cp_time, &ssize, NULL, 0) < 0)
+ memset(cur.cp_time, 0, sizeof(cur.cp_time));
+ }
+
deref_nl(X_TK_NIN, &cur.tk_nin, sizeof(cur.tk_nin));
deref_nl(X_TK_NOUT, &cur.tk_nout, sizeof(cur.tk_nout));
}
diff -r b9b077bf3049 -r 194247e47b72 usr.bin/vmstat/dkstats.h
--- a/usr.bin/vmstat/dkstats.h Fri Jun 23 16:30:10 2000 +0000
+++ b/usr.bin/vmstat/dkstats.h Fri Jun 23 16:40:11 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dkstats.h,v 1.1 1996/05/10 23:19:28 thorpej Exp $ */
+/* $NetBSD: dkstats.h,v 1.1.12.1 2000/06/23 16:40:15 minoura Exp $ */
/*
* Copyright (c) 1996 John M. Vinopal
@@ -43,7 +43,7 @@
u_int64_t *dk_seek; /* # of seeks (currently unused). */
u_int64_t *dk_bytes; /* # of bytes transfered. */
struct timeval *dk_time; /* Time spent in disk i/o. */
- long tk_nin; /* TTY Chars in. */
- long tk_nout; /* TTY Chars out. */
- long cp_time[CPUSTATES]; /* System timer ticks. */
+ u_int64_t tk_nin; /* TTY Chars in. */
+ u_int64_t tk_nout; /* TTY Chars out. */
+ u_int64_t cp_time[CPUSTATES]; /* System timer ticks. */
};
diff -r b9b077bf3049 -r 194247e47b72 usr.bin/vmstat/vmstat.8
--- a/usr.bin/vmstat/vmstat.8 Fri Jun 23 16:30:10 2000 +0000
+++ b/usr.bin/vmstat/vmstat.8 Fri Jun 23 16:40:11 2000 +0000
@@ -1,4 +1,35 @@
-.\" $NetBSD: vmstat.8,v 1.17 2000/05/17 09:49:32 fair Exp $
+.\" $NetBSD: vmstat.8,v 1.17.2.1 2000/06/23 16:40:15 minoura Exp $
+.\"
+.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the NetBSD
+.\" Foundation, Inc. and its contributors.
+.\" 4. Neither the name of The NetBSD Foundation nor the names of its
+.\" contributors may be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.\" Copyright (c) 1986, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -40,7 +71,7 @@
.SH SYNOPSIS
.nf
.ft B
-vmstat [ \-fHilms ] [ \-h histname ] [ \-c count ] [ \-M core ]
+vmstat [ \-efHilmsv ] [ \-h histname ] [ \-c count ] [ \-M core ]
.ti +5
[ \-N system ] [ \-w wait ] [ disks ]
.ft R
@@ -62,12 +93,14 @@
.I wait
interval is specified, the default is 1 second.
.TP
+\-e
+Report the values of system event counters.
+.TP
\-f
Report fork statistics.
.TP
\-i
-Report on the number of interrupts taken by each device since system
-startup.
+Report the values of system interrupt counters.
.TP
\-M
Extract values associated with the name list from the specified core
@@ -87,6 +120,11 @@
structure, giving the total number of several kinds of paging related
events which have occurred since system startup.
.TP
+\-v
+Print more verbose information. When used with the
+\-i or \-e flags, prints out all interrupts or event counters,
+not just those with non-zero values.
+.TP
\-w
Pause
.I wait
diff -r b9b077bf3049 -r 194247e47b72 usr.bin/vmstat/vmstat.c
--- a/usr.bin/vmstat/vmstat.c Fri Jun 23 16:30:10 2000 +0000
+++ b/usr.bin/vmstat/vmstat.c Fri Jun 23 16:40:11 2000 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: vmstat.c,v 1.63 2000/04/24 17:40:31 thorpej Exp $ */
+/* $NetBSD: vmstat.c,v 1.63.2.1 2000/06/23 16:40:16 minoura Exp $ */
/*-
- * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -80,7 +80,7 @@
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95";
#else
-__RCSID("$NetBSD: vmstat.c,v 1.63 2000/04/24 17:40:31 thorpej Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.63.2.1 2000/06/23 16:40:16 minoura Exp $");
#endif
#endif /* not lint */
@@ -95,6 +95,7 @@
#include <sys/namei.h>
#include <sys/malloc.h>
#include <sys/ioctl.h>
+#include <sys/sched.h>
#include <sys/sysctl.h>
#include <sys/device.h>
#include <sys/pool.h>
@@ -118,35 +119,33 @@
#include <uvm/uvm_stat.h>
struct nlist namelist[] = {
-#define X_CPTIME 0
- { "_cp_time" },
-#define X_BOOTTIME 1
+#define X_BOOTTIME 0
{ "_boottime" },
-#define X_HZ 2
+#define X_HZ 1
{ "_hz" },
-#define X_STATHZ 3
+#define X_STATHZ 2
{ "_stathz" },
-#define X_NCHSTATS 4
+#define X_NCHSTATS 3
{ "_nchstats" },
-#define X_INTRNAMES 5
+#define X_INTRNAMES 4
{ "_intrnames" },
-#define X_EINTRNAMES 6
+#define X_EINTRNAMES 5
{ "_eintrnames" },
-#define X_INTRCNT 7
+#define X_INTRCNT 6
{ "_intrcnt" },
-#define X_EINTRCNT 8
+#define X_EINTRCNT 7
{ "_eintrcnt" },
-#define X_KMEMSTAT 9
+#define X_KMEMSTAT 8
{ "_kmemstats" },
-#define X_KMEMBUCKETS 10
+#define X_KMEMBUCKETS 9
{ "_bucket" },
Home |
Main Index |
Thread Index |
Old Index