aboutsummaryrefslogtreecommitdiff
path: root/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/content/en/books/arch-handbook/driverbasics/_index.adoc')
-rw-r--r--documentation/content/en/books/arch-handbook/driverbasics/_index.adoc39
1 files changed, 20 insertions, 19 deletions
diff --git a/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc b/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc
index acaca6502e..b55be854c3 100644
--- a/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc
+++ b/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc
@@ -6,7 +6,8 @@ description: Writing FreeBSD Device Drivers
tags: ["writing", "device drivers", "KLD", "FreeBSD"]
showBookMenu: true
weight: 11
-path: "/books/arch-handbook/"
+params:
+ path: "/books/arch-handbook/driverbasics/"
---
[[driverbasics]]
@@ -90,28 +91,28 @@ Skeleton Layout of a kernel module
static int
skel_loader(struct module *m, int what, void *arg)
{
- int err = 0;
-
- switch (what) {
- case MOD_LOAD: /* kldload */
- uprintf("Skeleton KLD loaded.\n");
- break;
- case MOD_UNLOAD:
- uprintf("Skeleton KLD unloaded.\n");
- break;
- default:
- err = EOPNOTSUPP;
- break;
- }
- return(err);
+ int err = 0;
+
+ switch (what) {
+ case MOD_LOAD: /* kldload */
+ uprintf("Skeleton KLD loaded.\n");
+ break;
+ case MOD_UNLOAD:
+ uprintf("Skeleton KLD unloaded.\n");
+ break;
+ default:
+ err = EOPNOTSUPP;
+ break;
+ }
+ return(err);
}
/* Declare this module to the rest of the kernel */
static moduledata_t skel_mod = {
- "skel",
- skel_loader,
- NULL
+ "skel",
+ skel_loader,
+ NULL
};
DECLARE_MODULE(skeleton, skel_mod, SI_SUB_KLD, SI_ORDER_ANY);
@@ -343,4 +344,4 @@ For this reason, no serious applications rely on block devices, and in fact, alm
Drivers for network devices do not use device nodes in order to be accessed. Their selection is based on other decisions made inside the kernel and instead of calling open(), use of a network device is generally introduced by using the system call socket(2).
-For more information see ifnet(9), the source of the loopback device, and Bill Paul's network drivers.
+For more information see ifnet(9), the source of the loopback device.