Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2007 14:07:12 +0200
From:      "Die Gestalt" <die.gestalt@gmail.com>
To:        freebsd-drivers@freebsd.org
Subject:   Re: Simple driver
Message-ID:  <5bf3e10d0707310507p1c2bd7dbx381e2c96bce39f10@mail.gmail.com>
In-Reply-To: <001001c7d2ee$283f8790$54759a52@Lusitania>
References:  <001001c7d2ee$283f8790$54759a52@Lusitania>

next in thread | previous in thread | raw e-mail | index | archive | help
That's because when you program a driver you really don't need to
check the input values. You can cast values and dereference them and
hope it will work, that's no problem. Oh no wait, that's exactly the
other way around.

Read this:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/book.html

Work on the examples, spend some time and if you still have a problem
feel free to ask.

By the way I think you can do what you want without writing a driver.
Which brings me to some rules regarding driver development:

1 - You don't need to write a driver.
2 - If you really need to write a driver, see rule #1
3 - If you absolutely need to write a driver and the sake of humanity
depends on this very driver you are about to write then OMG A THREE
HEADED MONKEY!!!

On 7/30/07, Ar3s <Ar3s@sapo.pt> wrote:
> Hello everyone,
> Im not sure if this is the right list for my question. I'm trying to make a simple module that will echo some information of a given pid. But the problem is that it causes the kernel to panic, and I have no idea why. I have attached the source.
>
> cheers,
> Bruno
> _______________________________________________
> freebsd-drivers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-drivers
> To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org"
>
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5bf3e10d0707310507p1c2bd7dbx381e2c96bce39f10>