* Linux kernel 2.4 programming problem
@ 2007-06-12 13:54 Federico Paparoni
2007-06-12 15:12 ` Randy Dunlap
2007-06-12 15:17 ` debian developer
0 siblings, 2 replies; 4+ messages in thread
From: Federico Paparoni @ 2007-06-12 13:54 UTC (permalink / raw)
To: linux-kernel
Hi all,
i'm trying to create a simple system call in a kernel 2.4 distribution.
I read guide/articles like this
http://irfanhabib.wordpress.com/2006/10/01/adding-a-system-call-linux-24x/
All the articles say the same things, but the implementation of my new
system call doesn't work.
I create a new entry in arch/i386/kernel/entry.S
I create a new entry in include/asm/unistd.h
I create a new function with the asmlinkage prefix in a source file
already defined (in ipc/sem.c for example)
When i create my user program, it doesn't work. Firstly when i try to
compile i receive a problem like this
: undefined reference to 'errno'
Then I include errno.h (also if i don't understand this step) and the
compilation works, but the syscall neverworks, because the call always
return -1.
Any help?
Any tutorial FOR DUMMY MAN that someone already used?
Cheers
Federico
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux kernel 2.4 programming problem
2007-06-12 13:54 Linux kernel 2.4 programming problem Federico Paparoni
@ 2007-06-12 15:12 ` Randy Dunlap
2007-06-12 15:17 ` debian developer
1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2007-06-12 15:12 UTC (permalink / raw)
To: Federico Paparoni; +Cc: linux-kernel
On Tue, 12 Jun 2007 15:54:57 +0200 Federico Paparoni wrote:
> Hi all,
> i'm trying to create a simple system call in a kernel 2.4 distribution.
> I read guide/articles like this
>
> http://irfanhabib.wordpress.com/2006/10/01/adding-a-system-call-linux-24x/
>
> All the articles say the same things, but the implementation of my new
> system call doesn't work.
> I create a new entry in arch/i386/kernel/entry.S
> I create a new entry in include/asm/unistd.h
> I create a new function with the asmlinkage prefix in a source file
> already defined (in ipc/sem.c for example)
>
> When i create my user program, it doesn't work. Firstly when i try to
> compile i receive a problem like this
>
> : undefined reference to 'errno'
>
> Then I include errno.h (also if i don't understand this step) and the
> compilation works, but the syscall neverworks, because the call always
> return -1.
>
> Any help?
> Any tutorial FOR DUMMY MAN that someone already used?
You can try this one. It used to work, but I haven't updated or
tested it lately.
http://www.xenotime.net/linux/syscall_ex/
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux kernel 2.4 programming problem
2007-06-12 13:54 Linux kernel 2.4 programming problem Federico Paparoni
2007-06-12 15:12 ` Randy Dunlap
@ 2007-06-12 15:17 ` debian developer
2007-06-12 15:18 ` Jan Engelhardt
1 sibling, 1 reply; 4+ messages in thread
From: debian developer @ 2007-06-12 15:17 UTC (permalink / raw)
To: Federico Paparoni; +Cc: linux-kernel
Please look into http://kernelnewbies.org
On 6/12/07, Federico Paparoni <federico.paparoni@gmail.com> wrote:
> Hi all,
> i'm trying to create a simple system call in a kernel 2.4 distribution.
> I read guide/articles like this
>
> http://irfanhabib.wordpress.com/2006/10/01/adding-a-system-call-linux-24x/
>
> All the articles say the same things, but the implementation of my new
> system call doesn't work.
> I create a new entry in arch/i386/kernel/entry.S
> I create a new entry in include/asm/unistd.h
> I create a new function with the asmlinkage prefix in a source file
> already defined (in ipc/sem.c for example)
>
> When i create my user program, it doesn't work. Firstly when i try to
> compile i receive a problem like this
>
> : undefined reference to 'errno'
>
> Then I include errno.h (also if i don't understand this step) and the
> compilation works, but the syscall neverworks, because the call always
> return -1.
>
> Any help?
> Any tutorial FOR DUMMY MAN that someone already used?
>
> Cheers
>
> Federico
> -
> 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/
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Linux kernel 2.4 programming problem
2007-06-12 15:17 ` debian developer
@ 2007-06-12 15:18 ` Jan Engelhardt
0 siblings, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2007-06-12 15:18 UTC (permalink / raw)
To: debian developer; +Cc: Federico Paparoni, linux-kernel
On Jun 12 2007 20:47, debian developer wrote:
>
> Please look into http://kernelnewbies.org
>
> On 6/12/07, Federico Paparoni <federico.paparoni@gmail.com> wrote:
>> Hi all,
>> i'm trying to create a simple system call in a kernel 2.4 distribution.
>> I read guide/articles like this
>> http://irfanhabib.wordpress.com/2006/10/01/adding-a-system-call-linux-24x/
>>[...]
And don't top post.
Jan
--
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-12 15:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-12 13:54 Linux kernel 2.4 programming problem Federico Paparoni
2007-06-12 15:12 ` Randy Dunlap
2007-06-12 15:17 ` debian developer
2007-06-12 15:18 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®