[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [Philip N Daly <pnd@noao.edu>] (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [Philip N Daly <pnd@noao.edu>] (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Mon, 7 May 2001 17:22:03 +0200 (CEST)
>From owner-rtl Mon May 7 10:19:29 2001
Received: from noao.edu (email.noao.edu [140.252.1.54])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f47GJTJ14128
for <rtl@fsmlabs.com>; Mon, 7 May 2001 10:19:29 -0600
Received: from yam.tuc.noao.edu ([140.252.23.194] verified)
by noao.edu (CommuniGate Pro SMTP 3.4.4)
with ESMTP id 852751 for rtl@fsmlabs.com; Mon, 07 May 2001 09:15:25 -0700
Received: from yam.tuc.noao.edu (yam.tuc.noao.edu [140.252.23.194])
by yam.tuc.noao.edu (8.9.1/8.9.1/SAG-04Feb01) with SMTP id KAA14684
for <rtl@fsmlabs.com>; Mon, 7 May 2001 10:15:24 -0600 (MDT)
Message-Id: <200105071615.KAA14684@yam.tuc.noao.edu>
Date: Mon, 7 May 2001 10:15:24 -0600 (MDT)
From: Philip N Daly <pnd@noao.edu>
Reply-To: Philip N Daly <pnd@noao.edu>
Subject: Re: [rtl] something wrong with printk???
To: rtl@fsmlabs.com
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Content-MD5: ydd/8ke351z9OMcCYVBAHg==
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.3.5 SunOS 5.7 sun4u sparc
> Hi all,
> this is probably a simple question but I am not sure where to look for
> the answer. I have Rubini's Linux Device Drivers book, and I am trying
> to get his example Hello World module going. I am running Red Hat 6.2
> kernel 2.2.14-5.0. Here is the code that I use:
>
> #define MODULE
> #include <linux/module.h>
>
> int init_module(void) { printk("<1>Hello World\n"); return 0;}
> void cleanup_module(void) {printk("<1>Goodbye\n");}
>
> and this is what I type when I am logged in as root:
>
> # gcc -c hello.c
> # insmod hello.o
>
> the message "Hello World" does not get displayed
>
> then I type:
>
> #rmmod hello
>
> the message "Goodbye" does not get displayed.
>
> I can tell (I think) that the module is being inserted because if I try to
> insert it twice without removing it first, it says a module with that name
> already exists.
use the dmesg command to see the output or tail /var/log/messages. Printk
sends output to the console which you can't see if you're running an
xterm (for example).
+==================================================================+
Phil Daly, NOAO/AURA, 950 N. Cherry Avenue, Tucson AZ 85719, U S A
E-mail: pdaly@noao.edu V-mail: (520) 318 8438 Fax: (520) 318 8360