Help!

How to call execve() form a function under linux2.4.x/driv..


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Embeded RSS
Next:  Porting linux kernel on Windriver SBC 7447 board.  
Author Message
Ken
External


Since: Jul 13, 2007
Posts: 2



PostPosted: Fri Jul 13, 2007 12:43 am    Post subject: How to call execve() form a function under linux2.4.x/drivers/char/?
Archived from groups: comp>os>linux>embedded (more info?)

Hi all,

I am writing a driver for GPIO device, gpio_int.c, and I put it under /
linux-2.4.x/drivers/char.
I need to call execve() in a function, v_hwrb_timer_handler() in
gpio_int.c:

void v_hwrb_timer_handler()
{
...
execve(path, argv, argc);
...
}

When I make it, I get the result:

drivers/char/char.o(.text+0xe9c4): In function `v_hwrb_timer_handler':
: undefined reference to `execve'
make[1]: *** [linux] Error 1
make[1]: Leaving directory `/home/uClinux-dist/linux-2.4.x'
make: *** [linux] Error 1

Can anyone present ideas for it?

Sincerely,

Ken
Back to top
david m
External


Since: Jul 13, 2007
Posts: 6



PostPosted: Fri Jul 13, 2007 11:16 am    Post subject: Re: How to call execve() form a function under [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Wolfgang Mües
External


Since: Apr 07, 2004
Posts: 21



PostPosted: Fri Jul 13, 2007 9:54 pm    Post subject: Re: How to call execve() form a function under linux2.4.x/drivers/char/? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ken wrote:

> I am writing a driver for GPIO device, gpio_int.c, and I put it under /
> linux-2.4.x/drivers/char.
> I need to call execve() in a function
execve() is not supported inside the kernel. It is only available in user
space.

Read this:

http://mirror.linux.org.au/linux.conf.au/2005/cdrom-beta-1/linux-mando...2.4.31/

regards

Wolfgang
Back to top
Ken
External


Since: Jul 13, 2007
Posts: 2



PostPosted: Sun Jul 15, 2007 8:24 am    Post subject: Re: How to call execve() form a function under linux2.4.x/drivers/char/? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 14, 3:54 am, Wolfgang Mües <wolfg....TakeThisOut@iksw-muees.de> wrote:
> Ken wrote:
> > I am writing a driver for GPIO device, gpio_int.c, and I put it under /
> > linux-2.4.x/drivers/char.
> > I need to call execve() in a function
>
> execve() is not supported inside the kernel. It is only available in user
> space.
>
> Read this:
>
> http://mirror.linux.org.au/linux.conf.au/2005/cdrom-beta-1/linux-mand...
>
> regards
>
> Wolfgang

Thank you for your advices, this problem has been solved by add a
macro before <unistd.h>
#KERNEL_CALL
#include <unistd.h>

regards,

Ken
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Embeded All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum