Problem while adding a module to the kernel

From: BalaKrishna Mallipeddi (
Date: Mon Jun 09 2003 - 01:45:41 EST

   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

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: 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
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,
Phone : 5278389 + 123

Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:19 EST