From owner-freebsd-doc Tue May 29 4:20: 8 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6842237B43F for ; Tue, 29 May 2001 04:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4TBK2D77803; Tue, 29 May 2001 04:20:02 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 511B337B422 for ; Tue, 29 May 2001 04:11:25 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4TBBP066365; Tue, 29 May 2001 04:11:25 -0700 (PDT) (envelope-from nobody) Message-Id: <200105291111.f4TBBP066365@freefall.freebsd.org> Date: Tue, 29 May 2001 04:11:25 -0700 (PDT) From: debolaz@debolaz.com To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: docs/27731: Incorrect example code in dev handbook causes FreeBSD to panic. Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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