git: ae3907096e - main - arch-handbook/driverbasics: use tabs to indent the example code
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 24 Feb 2024 18:51:50 UTC
The branch main has been updated by dbaio:
URL: https://cgit.FreeBSD.org/doc/commit/?id=ae3907096e54646bb5c9c98d7a221e330ce0f4f8
commit ae3907096e54646bb5c9c98d7a221e330ce0f4f8
Author: rilysh <nightquick@proton.me>
AuthorDate: 2024-01-02 13:09:49 +0000
Commit: Danilo G. Baio <dbaio@FreeBSD.org>
CommitDate: 2024-02-24 18:48:47 +0000
arch-handbook/driverbasics: use tabs to indent the example code
In the "Writing FreeBSD Device Drivers" page, the first example
uses 2 characters (spaces) to indent the code. Since FreeBSD
uses tabs (8 characters) to indent and as the second example
also follows this, it's better to just use tabs here as well.
Link: https://docs.freebsd.org/en/books/arch-handbook/driverbasics/
Reviewed by: Mina Galić <freebsd@igalic.co>, dbaio
Pull Request: https://github.com/freebsd/freebsd-doc/pull/319
Signed-off-by: rilysh <nightquick@proton.me>
---
.../books/arch-handbook/driverbasics/_index.adoc | 34 +++++++++++-----------
1 file changed, 17 insertions(+), 17 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..955b5510e7 100644
--- a/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc
+++ b/documentation/content/en/books/arch-handbook/driverbasics/_index.adoc
@@ -90,28 +90,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);