Date: Tue, 18 Jan 2000 16:17:54 +0200 (EET) From: Maxim Sobolev <sobomax@altavista.net> To: FreeBSD-gnats-submit@freebsd.org Subject: docs/16173: [PATCH] fix for the kld/cdev example Message-ID: <200001181417.QAA11283@vega.vega.com>
next in thread | raw e-mail | index | archive | help
>Number: 16173 >Category: docs >Synopsis: [PATCH] fix for the kld/cdev example >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 18 06:20:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: System Administrator >Release: FreeBSD 4.0-CURRENT i386 >Organization: Vega International Capital >Environment: >Description: Due to changes in the device interface /usr/share/examples/kld/cdev/module does not builds correctly anymore. >How-To-Repeat: cd /usr/share/examples/kld/cdev/module && make >Fix: diff -ruN module.orig/cdevmod.c module/cdevmod.c --- module.orig/cdevmod.c Tue Jan 18 15:11:26 2000 +++ module/cdevmod.c Mon Jan 17 15:59:25 2000 @@ -81,19 +81,14 @@ /* read */ noread, /* write */ nowrite, /* ioctl */ mydev_ioctl, - /* stop */ nostop, - /* reset */ noreset, - /* devtotty */ nodevtotty, /* poll */ nopoll, /* mmap */ nommap, /* strategy */ nostrategy, /* name */ "cdev", - /* parms */ noparms, /* maj */ CDEV_MAJOR, /* dump */ nodump, /* psize */ nopsize, /* flags */ D_TTY, - /* maxio */ 0, /* bmaj */ -1 }; @@ -123,6 +118,7 @@ printf("Copyright (c) 1998\n"); printf("Rajesh Vaidheeswarran\n"); printf("All rights reserved\n"); + cdevsw_add(&my_devsw); break; /* Success*/ case MOD_UNLOAD: @@ -139,4 +135,4 @@ /* Now declare the module to the system */ -DEV_MODULE(cdev, CDEV_MAJOR, -1, my_devsw, cdev_load, 0); +DEV_MODULE(cdev, cdev_load, 0); >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?200001181417.QAA11283>