WRT disk commands, make the man page consistent with the program, and add the
feature I expected.
This commit is contained in:
parent
a84dcb3095
commit
0e1a71bba5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cmdtab.c,v 1.18 2003/08/07 11:15:57 agc Exp $ */
|
||||
/* $NetBSD: cmdtab.c,v 1.19 2003/09/12 17:32:29 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1992, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)cmdtab.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: cmdtab.c,v 1.18 2003/08/07 11:15:57 agc Exp $");
|
||||
__RCSID("$NetBSD: cmdtab.c,v 1.19 2003/09/12 17:32:29 mycroft Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "systat.h"
|
||||
@ -70,11 +70,9 @@ struct command iostat_commands[] = {
|
||||
{ "rw", iostat_rw, "show read/write disk stats"},
|
||||
{ "all", iostat_all, "show combiend disk stats"},
|
||||
/* from disks.c */
|
||||
{ "add", disks_add, "add a disk to displayed disks"},
|
||||
{ "show", disks_add, "add a disk to displayed disks"},
|
||||
{ "delete", disks_delete, "remove a disk from displayed disks"},
|
||||
{ "ignore", disks_delete, "remove a disk from displayed disks"},
|
||||
{ "drives", disks_drives, "list all disks"},
|
||||
{ "display", disks_add, "add a disk to displayed disks"},
|
||||
{ "ignore", disks_remove, "remove a disk from displayed disks"},
|
||||
{ "drives", disks_drives, "list all disks/set disk list"},
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
@ -138,11 +136,9 @@ struct command vmstat_commands[] = {
|
||||
{ "time", vmstat_time, "show vm stats for each sample time"},
|
||||
{ "zero", vmstat_zero, "re-zero running totals"},
|
||||
/* from disks.c */
|
||||
{ "add", disks_add, "add a disk to displayed disks"},
|
||||
{ "show", disks_add, "add a disk to displayed disks"},
|
||||
{ "delete", disks_delete, "remove a disk from displayed disks"},
|
||||
{ "ignore", disks_delete, "remove a disk from displayed disks"},
|
||||
{ "drives", disks_drives, "list all disks"},
|
||||
{ "display", disks_add, "add a disk to displayed disks"},
|
||||
{ "ignore", disks_remove, "remove a disk from displayed disks"},
|
||||
{ "drives", disks_drives, "list all disks/set disk list"},
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: disks.c,v 1.13 2003/08/07 11:15:57 agc Exp $ */
|
||||
/* $NetBSD: disks.c,v 1.14 2003/09/12 17:32:31 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1992, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)disks.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: disks.c,v 1.13 2003/08/07 11:15:57 agc Exp $");
|
||||
__RCSID("$NetBSD: disks.c,v 1.14 2003/09/12 17:32:31 mycroft Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <ctype.h>
|
||||
@ -55,7 +55,7 @@ disks_add(char *args)
|
||||
}
|
||||
|
||||
void
|
||||
disks_delete(char *args)
|
||||
disks_remove(char *args)
|
||||
{
|
||||
|
||||
if (args)
|
||||
@ -67,10 +67,16 @@ disks_drives(char *args)
|
||||
{
|
||||
int i;
|
||||
|
||||
move(CMDLINE, 0);
|
||||
clrtoeol();
|
||||
for (i = 0; i < dk_ndrive; i++)
|
||||
printw("%s ", dr_name[i]);
|
||||
if (args) {
|
||||
for (i = 0; i < dk_ndrive; i++)
|
||||
dk_select[i] = 0;
|
||||
disks_add(args);
|
||||
} else {
|
||||
move(CMDLINE, 0);
|
||||
clrtoeol();
|
||||
for (i = 0; i < dk_ndrive; i++)
|
||||
printw("%s ", dr_name[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: extern.h,v 1.31 2003/08/07 11:15:58 agc Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.32 2003/09/12 17:32:31 mycroft Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -84,7 +84,7 @@ void closetcp(WINDOW *);
|
||||
void command(char *);
|
||||
void die(int);
|
||||
void disks_add(char *);
|
||||
void disks_delete(char *);
|
||||
void disks_remove(char *);
|
||||
void disks_drives(char *);
|
||||
void display(int);
|
||||
void error(const char *, ...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: systat.1,v 1.31 2003/08/30 12:27:26 dsl Exp $
|
||||
.\" $NetBSD: systat.1,v 1.32 2003/09/12 17:32:32 mycroft Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1985, 1990, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -464,12 +464,15 @@ should your system have more drives configured than can normally
|
||||
be displayed on the screen.
|
||||
.Pp
|
||||
.Bl -tag -width Ar -compact
|
||||
.It Cm ignore Op Ar drives
|
||||
Do not display information about the drives indicated.s
|
||||
Multiple drives may be specified, separated by spaces.
|
||||
.It Cm display Op Ar drives
|
||||
Display information about the drives indicated.
|
||||
Multiple drives may be specified, separated by spaces.
|
||||
.It Cm ignore Op Ar drives
|
||||
Do not display information about the drives indicated.
|
||||
Multiple drives may be specified, separated by spaces.
|
||||
.It Cm drives Op Ar drives
|
||||
With no arguments, displays a list of available drives. With arguments,
|
||||
replaced the list of currently displayed with the ones indicated.
|
||||
.El
|
||||
.Pp
|
||||
The following commands are specific to the
|
||||
|
Loading…
Reference in New Issue
Block a user