İs it possible now to use a system call in module programming ? after I "make" the module below I am getting warnings like that no errors
WARNING: "sys_getcwd" [/home....mod/mod01/mod01.ko] undefined!
/*
* hello-5.c - Demonstrates command line argument passing to a module.
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/stat.h>
#include <asm/unistd.h>
#include <asm/uaccess.h>
#include <linux/syscalls.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/fsnotify.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/hash.h>
#include <linux/cache.h>
#include <linux/module.h>
#include <linux/mount.h>
#include <linux/file.h>
#include <asm/uaccess.h>
#include <linux/security.h>
#include <linux/seqlock.h>
#include <linux/swap.h>
#include <linux/bootmem.h>
#include <linux/fs_struct.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Peter Jay Salzman");
char buf[1000];
static int __init hello_5_init(void)
{
sys_getcwd(buf,1000);
printk("%s,%d\n",buf,sizeof(buf));
}
static void __exit hello_5_exit(void)
{
printk(KERN_INFO "Goodbye, world 5\n");
}
module_init(hello_5_init);
module_exit(hello_5_exit);
and I can't insmod the module sure. maybe using system_calls in kernel 2.6.x is forbidden