> Is it possible to run RM (or any shell command) from my C application
code?
> Something like "System()" in Linux? Whether we can use LoadImage for this
> purpose?
If you application was started from the Shell you can do that
using ShellExecute from 'Library/ShellLib.h'. Example:

EFI_STATUS Status;
EFI_STATUS CommandStatus;
Status = ShellExecute (&gImageHandle, L"memmap", FALSE, NULL,
&CommandStatus);

If you were not started by the Shell you can run a new Shell and tell it to
run your command and exit afterwards using these LoadImage arguments:

-nomap -nostartup -noversion -_exit [CMD OR FILE]

Thanks
Michael

On Thu, Oct 13, 2016 at 3:29 AM, GN Keshava <keshava...@gmail.com> wrote:

> Thanks Laszlo.
>
> Is it possible to run RM (or any shell command) from my C application code?
> Something like "System()" in Linux? Whether we can use LoadImage for this
> purpose?
>
> Thanks again.
> Regards,
> Keshava
>
> On Wed 12 Oct, 2016 11:10 pm Laszlo Ersek, <ler...@redhat.com> wrote:
>
> > On 10/12/16 19:34, GN Keshava wrote:
> > > Thanks Laszlo, I'll check it out.
> > >
> > > I think I need to combine the LS implementation and RM implementation,
> > > isn't it? So there is no "format this volume" function or command
> > > exists, right?
> >
> > I'm unaware of any "format" command. And, I think it's enough if you
> > look at RM (LS should be unnecessary); RM already contains the recursion.
> >
> > Laszlo
> >
> >
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to