From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B42161A1E8B for ; Wed, 12 Oct 2016 23:27:05 -0700 (PDT) Received: by mail-it0-x232.google.com with SMTP id l13so170990699itl.1 for ; Wed, 12 Oct 2016 23:27:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0ssvrQb6EjMnwwDlUlW0Lnlz+zKex9gGVs23fOkht1I=; b=EjgOV66/QM815953cHDTrSG7H6R33lK1wSQq56c/X6POH6RclCDkW1wgMzKxuvgcfp eLAuCLTBcX8zspXwsud/NHV8eHgale6FQEZVl3PWCHIea0NsCQ6jYE6Txb7cibCB7sEI 4Kh5m9VcRG7ilvmdQCC9QklfJCbuJAFE4F4alPDDfnlMyg2OgdqCIPvx5aCvt7IXtE0m ppN8TndO9w/dHz/fmlL0WW5FPu9amas8wX0siJKtpcJvaKFR4WUcmTdLK3G9oh2MFoBj BpVxPWIrgBcuGxyXNEVNqr0/1YUnW1j0Obp9BR7Za28EPccpR3k5DCh2d8PH9dSjFzlk nMCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0ssvrQb6EjMnwwDlUlW0Lnlz+zKex9gGVs23fOkht1I=; b=NVBCicIgimH7P7VwAUX0w7SRYApNKq/Nrx+QkPwhxz/qwdi6WAbvKZ6hhvc7peg3wh R4Xf2hOyqWdRwCgkQtnfazv97NfbDOEAo2saiNwHF2ggntrOpIhuyUDS8MHNvgsIpzhO RMdHAGMTbviRBCcYIvCoWssP1/+kDApOgU1wQqH+3sYM2qvLBeFEVTLWgu1VzCgPcUVj S4lJ2qD4sCHJ2WBCj3m/DzKfaoFDqXAp3yj31JXovQqXUTItJpsS3WAJgmANC6T5goaa jw0DAajmFVh92qwVj0Mx1Iw1vVpi8gTLcfAF7Gl0iNQ/TY/X0rdlv3UqfKUSbQCcd21Q RZBQ== X-Gm-Message-State: AA6/9Rkx1vePpuepwZySpFOBoSCSxxGAPQhoFb2A2ATQtV9BMFyO9GQjLkhSFqVhUxzd6vyzdOAMAZ9K9lfhIQ== X-Received: by 10.36.242.196 with SMTP id j187mr5102275ith.102.1476340025079; Wed, 12 Oct 2016 23:27:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: GN Keshava Date: Thu, 13 Oct 2016 06:26:53 +0000 Message-ID: To: Michael Zimmermann Cc: Laszlo Ersek , edk2-devel-01 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: Format a volume in UEFI (or delete all files) X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2016 06:27:06 -0000 Content-Type: text/plain; charset=UTF-8 Thanks for the help, Michael.. Yes, I'm running the app from shell (at least for now).. I will try your suggestion. Thanks again. Regards, Keshava On Thu, 13 Oct 2016 at 11:50 Michael Zimmermann wrote: > > 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 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, 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 > > >