Deleted Added
full compact
devs.c (39498) devs.c (40060)
1/*
2 * Copyright (c) 1998 Kenneth D. Merry.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*
2 * Copyright (c) 1998 Kenneth D. Merry.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $Id: devs.c,v 1.1 1998/09/15 08:16:40 gibbs Exp $
28 * $Id: devs.c,v 1.2 1998/09/20 00:11:23 ken Exp $
29 */
30/*
31 * Some code and ideas taken from the old disks.c.
32 * static char sccsid[] = "@(#)disks.c 8.1 (Berkeley) 6/6/93";
33 */
34/*-
35 * Copyright (c) 1980, 1992, 1993
36 * The Regents of the University of California. All rights reserved.

--- 28 unchanged lines hidden (view full) ---

65 */
66
67#include <sys/types.h>
68#include <sys/devicestat.h>
69#include <sys/dkstat.h>
70
71#include <string.h>
72#include <devstat.h>
29 */
30/*
31 * Some code and ideas taken from the old disks.c.
32 * static char sccsid[] = "@(#)disks.c 8.1 (Berkeley) 6/6/93";
33 */
34/*-
35 * Copyright (c) 1980, 1992, 1993
36 * The Regents of the University of California. All rights reserved.

--- 28 unchanged lines hidden (view full) ---

65 */
66
67#include <sys/types.h>
68#include <sys/devicestat.h>
69#include <sys/dkstat.h>
70
71#include <string.h>
72#include <devstat.h>
73#include <stdlib.h>
74#include <ctype.h>
75#include <err.h>
73#include "systat.h"
74#include "extern.h"
76#include "systat.h"
77#include "extern.h"
78#include "devs.h"
75
76typedef enum {
77 DS_MATCHTYPE_NONE,
78 DS_MATCHTYPE_SPEC,
79 DS_MATCHTYPE_PATTERN
80} last_match_type;
81
82last_match_type last_type;

--- 102 unchanged lines hidden (view full) ---

185}
186
187static int
188dsmatchselect(char *args, devstat_select_mode select_mode, int maxshowdevs,
189 struct statinfo *s1)
190{
191 char **tempstr;
192 char *tstr[100];
79
80typedef enum {
81 DS_MATCHTYPE_NONE,
82 DS_MATCHTYPE_SPEC,
83 DS_MATCHTYPE_PATTERN
84} last_match_type;
85
86last_match_type last_type;

--- 102 unchanged lines hidden (view full) ---

189}
190
191static int
192dsmatchselect(char *args, devstat_select_mode select_mode, int maxshowdevs,
193 struct statinfo *s1)
194{
195 char **tempstr;
196 char *tstr[100];
193 char *err_str;
194 int num_args = 0;
195 register int i;
196 int retval = 0;
197
198 /*
199 * Break the (pipe delimited) input string out into separate
200 * strings.
201 */

--- 121 unchanged lines hidden ---
197 int num_args = 0;
198 register int i;
199 int retval = 0;
200
201 /*
202 * Break the (pipe delimited) input string out into separate
203 * strings.
204 */

--- 121 unchanged lines hidden ---