Date: Tue, 29 May 2001 04:11:25 -0700 (PDT) From: debolaz@debolaz.com To: freebsd-gnats-submit@freebsd.org Subject: docs/27731: Incorrect example code in dev handbook causes FreeBSD to panic. Message-ID: <200105291111.f4TBBP066365@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 27731 >Category: docs >Synopsis: Incorrect example code in dev handbook causes FreeBSD to panic. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Tue May 29 04:20:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Anders Nor Berle >Release: FreeBSD 4.3 >Organization: >Environment: >Description: In section 18.2 of the FreeBSD Developers Handbook, an example code for a generic device is shown. This code is invalid. --> DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY); <-- Should be replaced with --> static moduledata_t linux_elf_mod = { "linuxelf", linux_elf_modevent, 0 }; DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY); <-- >How-To-Repeat: Just the code in 18.2 and try it to see the effect. :) >Fix: The line --> DECLARE_MODULE(skeleton, skel_loader, SI_SUB_KLD, SI_ORDER_ANY); <-- Should be replaced with --> static moduledata_t skeleton_mod = { "skeleton", skel_loader, 0 }; DECLARE_MODULE(skeleton, skeleton_mod, SI_SUB_KLD, SI_ORDER_ANY); <-- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105291111.f4TBBP066365>