Message-ID: <4H9NMB$_Dz@smth.org>
Subject: �泄�printk������苫����位��������
Date: Fri, 11 Mar 2005 02:32:12 +0000
From: booklijian@smth.org-SPAM.no (sheep)
Path: news.cnusenet.org!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-cn.bbs.comp.unix.development.kernel.mbox.zip!g2news1.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!bbsnews.sdu.edu.cn!news.xjtu.edu.cn!news2.happynet.org!maily.cic.tsinghua.edu.cn!SMTH
Newsgroups: cn.bbs.comp.unix.development.kernel
Organization: BBS 水木�华站
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: KernelTech/c/M.1110508331.n0
Lines: 32
Xref: news.cnusenet.org cn.bbs.comp.unix.development.kernel:28677

�������崭湛�始学习linux�诤说����知识����写��一��小�某���������一�隆��������遣��芄�通�����没����示��息���������源���附�拢����位����指�。
#ifndef _KERNEL_
#define _KERNEL_
#endif 
#ifndef MODULE
#define MODULE
#endif
#include<linux/config.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
#ifdef CONFIG_SMP
#define _SMP_
#endif
#define _NO_VERSION_
#include<linux/version.h>
#include<linux/kernel.h>
char kernel_version[]=UTS_RELEASE;

int init_module(void)
{
    printk(KERN_INFO "This is a test!\n");
    return 0;
}

void cleanup_module(void)
{
    printk(KERN_INFO "This is going now !\n");
}
使��gcc -c test.c -I/usr/src/linux2.4.20-8/include ���,������示说KERN_INFO�薹��业�����实�������丫���<linux/kernel.h>���业��恕�实���薹����医�KERN_INFO�幕�为<0>�捅���通���耍���������幕��没�������������/var/log/messages�募���也没���业������息�����位��������指�。�浅���谢��
--

�� ��源:��BBS 水木�华站 http://smth.org��[FROM: 210.72.13.*]