LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-29-2002, 10:55 PM   #1
udayan
Member
 
Registered: Apr 2002
Location: India
Distribution: Linux Redhat 7.0
Posts: 62

Rep: Reputation: 15
adding system call in linux


Hi,
i am working on implementation of system call, where i tried to
implement a system call in which i made the following changes in
the code:

1. In file /usr/src/linux/fs

a) Makefile :
I added O_OBJS += myservice.o

b) myservice.c
wrote a function :
#include <linux/myservice.h>
asmlinkage int sys_myservice(unsigned int arg1)
{
printk("/n i m in my service");
return(1);
}

2. In file /usr/src/linux/include/asm
unistd.h
.long SYMBOL_NAME(sys_myservice) /*191*/

3. In file /usr/src/linux/arch/i386/kernel
entry.S
#define __NR_myservice 191

4. In file /usr/src/linux/include/linux
myservice.h
#ifndef __LINUX_MYSERVICE_H
#define __LINUX_MYSERVICE_H

#include <linux/unistd.h>
#include <linux/linkage.h>
#include<linux/kernel.h>
_syscall2(int, myservice, int, arg1);
#endif

after compiling and rebooting i got the following errors during
rebooting
1. system logger --- failed
2. NFS lockd ------ failed

also when i tried to run this system call, i got the following
error:

/tmp/ccMK9qPM.o :In function 'main':
/tmp/ccMK9qPM.o(text+0xc):undefined reference to 'secclose'
collect2 :Id returned 1 exit status.


I saw that you are also working on system calls . Might be we
can
be of help to each other. We can discuss the particular problem.
regards and thanx in advance
Udayan
 
Old 05-02-2002, 03:26 AM   #2
gluon
Member
 
Registered: Jun 2001
Location: Switzerland
Distribution: SuSE 8.[012], Gentoo
Posts: 42

Rep: Reputation: 15
Hi udayan,

I've just read the e-mail you've sent to me, but I don't have any solution to your problem ! In fact, I'm not a "kernel hacker" :-)

Regards

Gluon
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with adding a system call newcat Programming 17 04-08-2006 06:50 AM
Adding a system call to SuSE Linux khcm8jw Linux - Newbie 3 10-23-2005 04:36 AM
Adding system call in linux guam Programming 2 12-04-2004 01:38 PM
Adding system call dumb82 Linux - Newbie 0 07-20-2004 02:25 AM
Adding new System Call to Kernel kurt_ram Linux - General 1 10-22-2002 03:59 PM


All times are GMT -5. The time now is 08:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration