[ELDK] function equivalent to the "system" in kernel space

Detlev Zundel dzu at denx.de
Thu Feb 12 19:27:37 CET 2009


Hi Cláudia,

> I need to do this in my kernel module:
> system("cd /ptin/install_dir/");
> system("chmod 777 software_image.tar");
> system("tar xzf software_image.tar");
> system("cd /ptin/");
> system("./swap");// swap is a shell script that I need to run

Why do you think you "need" this functionality?  Although there are
tricks to play to call-out into userspace from the kernel, I am pretty
sure that in your case the answer is to re-think the design of your
software.

> Somebody knows if exists a function equivalent to "system" (function
> to user space) for kernel space?

No, such a function *voluntarily* does not exist.  The split
kernel/userspace is there for a reason.

Best wishes
  Detlev

-- 
I can understand that things like user-level libraries have to take crazy people
into account, but the kernel internal libraries definitely do not.
                                     -- Linus Torvalds
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the eldk mailing list