Problem while adding a module to the kernel

BalaKrishna Mallipeddi (bkmallipeddi@yahoo.com)
Sun, 8 Jun 2003 23:45:41 -0700 (PDT)


Hi,
while adding a module to Montavista Linux for PPC
architecture i am in trouble.

First i added a simple system call with a simple
print statement and it is working fine.
For easy development i am writing as module to
replace this existing system call.

After that developed a simple module to replace
this system call and it also working. While developing
the actual module, i am getting problems.

While compiling the module i got the following
warning:

rfs_fdisk_module.c:343: warning: implicit declaration
of function `ioctl'

While including the module in to kernel using 'insmod'
i am getting the following errors:
root@(none):/home/chois/rfs_modules/fdisk# insmod
rfs_fdisk_module.o
rfs_fdisk_module.o: unresolved symbol read
rfs_fdisk_module.o: unresolved symbol reboot
rfs_fdisk_module.o: unresolved symbol lseek
rfs_fdisk_module.o: unresolved symbol _exit
rfs_fdisk_module.o: unresolved symbol write
rfs_fdisk_module.o: unresolved symbol ioctl
rfs_fdisk_module.o:
Hint: You are trying to load a module without a GPL
compatible license
and it has unresolved symbols. Contact the
module supplier for
assistance, only they can help you.

I included 'unistd.h' and 'sys/reboot.h' headers. To
resolve these errors if i include the headers
'sys/ioctl.h', 'string.h','sys/types.h', 'stdlib.h' it
is giving many errors of type 'redefinition of
'......' symbol.

If anybody helps me i am greatful to you. Also let me
know any good documents for what precautions(what to
do and what not to do) to take for kernel programming.

Thanks & Regards

=====
BalaKrishna Mallipeddi
Member Technical Staff Software
Innomedia Technologies Pvt. Ltd.,
#3278, 12th Main, HAL 2nd stage,
Bangalore-560008,
INDIA
Phone : 5278389 + 123

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/