DEV_MODULE.9 (88509) | DEV_MODULE.9 (230330) |
---|---|
1.\" -*- nroff -*- 2.\" 3.\" Copyright (c) 2001 Alexander Langer 4.\" 5.\" All rights reserved. 6.\" 7.\" This program is free software. 8.\" --- 12 unchanged lines hidden (view full) --- 21.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28.\" | 1.\" -*- nroff -*- 2.\" 3.\" Copyright (c) 2001 Alexander Langer 4.\" 5.\" All rights reserved. 6.\" 7.\" This program is free software. 8.\" --- 12 unchanged lines hidden (view full) --- 21.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28.\" |
29.\" $FreeBSD: head/share/man/man9/DEV_MODULE.9 88509 2001-12-26 23:14:04Z davidc $ | 29.\" $FreeBSD: head/share/man/man9/DEV_MODULE.9 230330 2012-01-19 09:51:07Z ed $ |
30.\" | 30.\" |
31.Dd March 11, 2001 | 31.Dd January 19, 2012 |
32.Dt DEV_MODULE 9 33.Os 34.Sh NAME 35.Nm DEV_MODULE 36.Nd device driver module declaration macro 37.Sh SYNOPSIS 38.In sys/param.h 39.In sys/kernel.h --- 23 unchanged lines hidden (view full) --- 63.Fn destroy_dev . 64.Sh EXAMPLES 65.Bd -literal 66#include <sys/module.h> 67#include <sys/conf.h> 68 69static struct cdevsw foo_devsw = { ... }; 70 | 32.Dt DEV_MODULE 9 33.Os 34.Sh NAME 35.Nm DEV_MODULE 36.Nd device driver module declaration macro 37.Sh SYNOPSIS 38.In sys/param.h 39.In sys/kernel.h --- 23 unchanged lines hidden (view full) --- 63.Fn destroy_dev . 64.Sh EXAMPLES 65.Bd -literal 66#include <sys/module.h> 67#include <sys/conf.h> 68 69static struct cdevsw foo_devsw = { ... }; 70 |
71static dev_t sdev; | 71static struct cdev *sdev; |
72 73static int 74foo_load(module_t mod, int cmd, void *arg) 75{ 76 int err = 0; 77 78 switch (cmd) { 79 case MOD_LOAD: --- 26 unchanged lines hidden --- | 72 73static int 74foo_load(module_t mod, int cmd, void *arg) 75{ 76 int err = 0; 77 78 switch (cmd) { 79 case MOD_LOAD: --- 26 unchanged lines hidden --- |