projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4_3_Reno release
[unix-history]
/
usr
/
src
/
usr.bin
/
systat
/
mbufs.c
diff --git
a/usr/src/usr.bin/systat/mbufs.c
b/usr/src/usr.bin/systat/mbufs.c
index
9d281a1
..
36e0b17
100644
(file)
--- a/
usr/src/usr.bin/systat/mbufs.c
+++ b/
usr/src/usr.bin/systat/mbufs.c
@@
-1,24
+1,26
@@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
#ifndef lint
#ifndef lint
-static char sccsid[] = "@(#)mbufs.c
1.5 (Berkeley) %G%
";
-#endif
+static char sccsid[] = "@(#)mbufs.c
5.3 (Berkeley) 5/11/89
";
+#endif
not lint
#include "systat.h"
#include "systat.h"
-#include <sys/param.h>
#include <sys/mbuf.h>
#include <sys/mbuf.h>
-#include <sys/file.h>
-#include <nlist.h>
+#include <paths.h>
WINDOW *
openmbufs()
{
WINDOW *
openmbufs()
{
-
return (subwin(stdscr, LINES-5-1, 0, 5, 0));
}
closembufs(w)
WINDOW *w;
{
return (subwin(stdscr, LINES-5-1, 0, 5, 0));
}
closembufs(w)
WINDOW *w;
{
-
if (w == NULL)
return;
wclear(w);
if (w == NULL)
return;
wclear(w);
@@
-30,10
+32,9
@@
struct mbstat *mb;
labelmbufs()
{
labelmbufs()
{
-
- wmove(wnd, 0, 0); wclrtoeol(wnd);
- mvwaddstr(wnd, 0, 10,
- "/0 /5 /10 /15 /20 /25 /30 /35 /40 /45 /50 /55 /60");
+ wmove(wnd, 0, 0); wclrtoeol(wnd);
+ mvwaddstr(wnd, 0, 10,
+ "/0 /5 /10 /15 /20 /25 /30 /35 /40 /45 /50 /55 /60");
}
char *mtnames[] = {
}
char *mtnames[] = {
@@
-94,26
+95,25
@@
showmbufs()
static struct nlist nlst[] = {
#define X_MBSTAT 0
{ "_mbstat" },
static struct nlist nlst[] = {
#define X_MBSTAT 0
{ "_mbstat" },
-
{ "" }
+ { "" }
};
initmbufs()
{
};
initmbufs()
{
-
if (nlst[X_MBSTAT].n_type == 0) {
if (nlst[X_MBSTAT].n_type == 0) {
- nlist(
"/vmunix"
, nlst);
+ nlist(
_PATH_UNIX
, nlst);
if (nlst[X_MBSTAT].n_type == 0) {
if (nlst[X_MBSTAT].n_type == 0) {
- error("namelist on
/vmunix failed"
);
- return;
+ error("namelist on
%s failed", _PATH_UNIX
);
+ return
(0)
;
}
}
if (mb == 0)
mb = (struct mbstat *)calloc(1, sizeof (*mb));
}
}
if (mb == 0)
mb = (struct mbstat *)calloc(1, sizeof (*mb));
+ return(1);
}
fetchmbufs()
{
}
fetchmbufs()
{
-
if (nlst[X_MBSTAT].n_type == 0)
return;
lseek(kmem, nlst[X_MBSTAT].n_value, L_SET);
if (nlst[X_MBSTAT].n_type == 0)
return;
lseek(kmem, nlst[X_MBSTAT].n_value, L_SET);