Deleted Added
full compact
dyn_sysctl.c (72336) dyn_sysctl.c (134520)
1/*-
2 * Copyright (c) 2000 Andrzej Bialecki <abial@freebsd.org>
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2000 Andrzej Bialecki <abial@freebsd.org>
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/share/examples/kld/dyn_sysctl/dyn_sysctl.c 72336 2001-02-10 22:36:05Z abial $
26 * $FreeBSD: head/share/examples/kld/dyn_sysctl/dyn_sysctl.c 134520 2004-08-30 09:49:59Z pjd $
27 */
28
29#include <sys/types.h>
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/module.h>
33#include <sys/sysctl.h>
34#include <sys/kernel.h>

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

148 if(sysctl_ctx_free(&clist1)) {
149 printf("sysctl_ctx_free(%p) failed!\n", &clist1);
150 /* Remove subtree forcefully... */
151 sysctl_remove_oid(a_root, 1, 1);
152 } else
153 printf("Ok\n");
154 break;
155 default :
27 */
28
29#include <sys/types.h>
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/module.h>
33#include <sys/sysctl.h>
34#include <sys/kernel.h>

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

148 if(sysctl_ctx_free(&clist1)) {
149 printf("sysctl_ctx_free(%p) failed!\n", &clist1);
150 /* Remove subtree forcefully... */
151 sysctl_remove_oid(a_root, 1, 1);
152 } else
153 printf("Ok\n");
154 break;
155 default :
156 error = EINVAL;
156 error = EOPNOTSUPP;
157 break;
158 }
159 return error;
160}
161
162static moduledata_t mod_data= {
163 "dyn_sysctl",
164 load,
165 0
166};
167
168DECLARE_MODULE(dyn_sysctl, mod_data, SI_SUB_EXEC, SI_ORDER_ANY);
157 break;
158 }
159 return error;
160}
161
162static moduledata_t mod_data= {
163 "dyn_sysctl",
164 load,
165 0
166};
167
168DECLARE_MODULE(dyn_sysctl, mod_data, SI_SUB_EXEC, SI_ORDER_ANY);