[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: where can I find sys_read,sys_create...
- From: "Matthews, John" <JMatthews LIO AACISD com>
- To: "'redhat-list redhat com'" <redhat-list redhat com>
- Subject: RE: where can I find sys_read,sys_create...
- Date: Thu Feb 28 11:24:01 2002
First, I think this question is a little off topic. You would be
better suited posting to a kernel development site.
To answer your question. I don't believe you want to use other
system calls inside your own system call.
This is generally considered a bad idea. On the other hand I think
you could benefit a lot from reading the source to sys_open and sys_write.
sys_open and sys_close are in kernelsource/fs/open.c
sys_write and sys_read are in kernelsource/fs/read_write.c
I don't think you'll need to look at any other system calls if you
just want to copy a file.
Next time your looking for something in the kernel sources, try to
use grep, it should help you narrow down what your looking for.
You can add the system call as a module into the kernel. You'll
have to "steal" one of the reserved system call numbers,
for example you could do a "#define __NR_copyfile 230". In kernel
2.4.17 they have system calls defined up to number 225,
so I would suggest you choose a number after that. Then in your
user application you would have to specify what your using for
__NR_copyfile when you execute _syscallX(....) macro.
Good luck in your project,
John Matthews
-----Original Message-----
From: liyanen [mailto:liyanen 21cn com]
Sent: Wednesday, February 27, 2002 7:00 PM
To: redhat-list redhat com
Subject: where can I find sys_read,sys_create...
hello,all
I want to add a systemcall "copyfile" to the kernel,
I want to use other sys_call like
sys_open,sys_read,sys_write,sys_create,sys_close
,but I can't find them in the linux source with all my effort.
And,may I use module to do this copy work ?
can you so helpful to give me any addvice?
Thanks
liyanen
liyanen 21cn com
2002-02-28
_______________________________________________
Redhat-list mailing list
Redhat-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]