Deleted Added
full compact
subr_devstat.c (62454) subr_devstat.c (62573)
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 * $FreeBSD: head/sys/kern/subr_devstat.c 62454 2000-07-03 09:35:31Z phk $
28 * $FreeBSD: head/sys/kern/subr_devstat.c 62573 2000-07-04 11:25:35Z phk $
29 */
30
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/systm.h>
34#include <sys/bio.h>
35#include <sys/sysctl.h>
36

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

256 * that the generation number the user gets corresponds with the data the
257 * user gets. If the user makes a separate sysctl call to get the
258 * generation, and then a sysctl call to get the device statistics, the
259 * device list could have changed in that brief period of time. By
260 * supplying the generation number along with the statistics output, we can
261 * guarantee that the generation number and the statistics match up.
262 */
263static int
29 */
30
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/systm.h>
34#include <sys/bio.h>
35#include <sys/sysctl.h>
36

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

256 * that the generation number the user gets corresponds with the data the
257 * user gets. If the user makes a separate sysctl call to get the
258 * generation, and then a sysctl call to get the device statistics, the
259 * device list could have changed in that brief period of time. By
260 * supplying the generation number along with the statistics output, we can
261 * guarantee that the generation number and the statistics match up.
262 */
263static int
264sysctl_devstat (SYSCTL_HANDLER_ARGS)
264sysctl_devstat(SYSCTL_HANDLER_ARGS)
265{
266 int error, i;
267 struct devstat *nds;
268 struct devstatlist *devstat_head;
269
270 if (devstat_num_devs == 0)
271 return(EINVAL);
272

--- 37 unchanged lines hidden ---
265{
266 int error, i;
267 struct devstat *nds;
268 struct devstatlist *devstat_head;
269
270 if (devstat_num_devs == 0)
271 return(EINVAL);
272

--- 37 unchanged lines hidden ---