Deleted Added
full compact
subr_devstat.c (45569) subr_devstat.c (46381)
1/*
2 * Copyright (c) 1997, 1998, 1999 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) 1997, 1998, 1999 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: subr_devstat.c,v 1.9 1999/02/10 00:03:47 ken Exp $
28 * $Id: subr_devstat.c,v 1.10 1999/04/11 02:27:06 eivind Exp $
29 */
30
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/systm.h>
34#include <sys/time.h>
35#include <sys/types.h>
36#include <sys/sysctl.h>

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

284
285/*
286 * Sysctl entries for devstat. The first one is a node that all the rest
287 * hang off of.
288 */
289SYSCTL_NODE(_kern, OID_AUTO, devstat, CTLFLAG_RD, 0, "Device Statistics");
290
291SYSCTL_PROC(_kern_devstat, OID_AUTO, all, CTLFLAG_RD|CTLTYPE_OPAQUE,
29 */
30
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/systm.h>
34#include <sys/time.h>
35#include <sys/types.h>
36#include <sys/sysctl.h>

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

284
285/*
286 * Sysctl entries for devstat. The first one is a node that all the rest
287 * hang off of.
288 */
289SYSCTL_NODE(_kern, OID_AUTO, devstat, CTLFLAG_RD, 0, "Device Statistics");
290
291SYSCTL_PROC(_kern_devstat, OID_AUTO, all, CTLFLAG_RD|CTLTYPE_OPAQUE,
292 0, 0, sysctl_devstat, "S,devstat", "All Devices");
292 0, 0, sysctl_devstat, "S,devstat", "All devices in the devstat list");
293/*
294 * Export the number of devices in the system so that userland utilities
295 * can determine how much memory to allocate to hold all the devices.
296 */
293/*
294 * Export the number of devices in the system so that userland utilities
295 * can determine how much memory to allocate to hold all the devices.
296 */
297SYSCTL_INT(_kern_devstat, OID_AUTO, numdevs, CTLFLAG_RD, &devstat_num_devs,
298 0, "Number of devices in the devstat list");
297SYSCTL_INT(_kern_devstat, OID_AUTO, numdevs, CTLFLAG_RD,
298 &devstat_num_devs, 0, "Number of devices in the devstat list");
299SYSCTL_LONG(_kern_devstat, OID_AUTO, generation, CTLFLAG_RD,
299SYSCTL_LONG(_kern_devstat, OID_AUTO, generation, CTLFLAG_RD,
300 &devstat_generation, "Devstat list generation");
301SYSCTL_INT(_kern_devstat, OID_AUTO, version, CTLFLAG_RD, &devstat_version,
302 0, "Devstat list version number");
300 &devstat_generation, "Devstat list generation");
301SYSCTL_INT(_kern_devstat, OID_AUTO, version, CTLFLAG_RD,
302 &devstat_version, 0, "Devstat list version number");