public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: krishnaLee <sssky307@163.com>
To: edk2-devel@lists.01.org
Subject: A question about shell-application's argument make system blocked;
Date: Thu, 10 Jan 2019 14:12:41 +0800 (CST)	[thread overview]
Message-ID: <5740a63b.9ab0.16836642cdd.Coremail.sssky307@163.com> (raw)

Hi everybody,
I meet a question,a special arg can make system blocked,follow is my steps.
1,go to uefi shell v2.2(uefi v2.70),run this application in QEMU-ovmf:
testapp.efi
2,the output is "index:0,string:FS0:\testapp.efi"


3,testapp.efi #abc.
4,the output is same as step 2.  ///< I had read the uefi shell specification 2.2,the '#' is a comment remark,so I think it is ok.


5 testapp.efi "#abc"
6,the system blocked(dead).      ///< I think it is a bug.


//follow is the testapp.efi source code:
EFI_STATUS
EFIAPI
UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS status;
EFI_SHELL_PARAMETERS_PROTOCOL* param;
status=SystemTable->BootServices->HandleProtocol(ImageHandle,&gEfiShellParametersProtocolGuid,&param);
if(status!=EFI_SUCCESS)
{
return0;
}


for(UINTN i=0;i< param->Argc;i++)
{
Print(L"index:%d,string:%s\n",i,param->Argv[i]);
}


return EFI_SUCCESS;
}


//test environment:
//QEMU v2.10.95 + edk2-2018-ovmf-x64.
//shell command line:
//"D:\qemu\qemu-system-x86_64.exe" -machine pc-q35-2.9 -pflash "D:\qemu\bios\OVMF_x64_debug.fd" -serial stdio -hda fat:rw:G:\temp -net none
//end






thanks,
krishna.



\x16&#65533;&

             reply	other threads:[~2019-01-10  6:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10  6:12 krishnaLee [this message]
2019-01-10 15:15 ` A question about shell-application's argument make system blocked; Carsey, Jaben
2019-01-10 23:33   ` Jim.Dailey
2019-01-11  0:02     ` Carsey, Jaben
2019-01-11  2:59       ` krishnaLee
2019-01-11 12:27       ` Jim.Dailey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5740a63b.9ab0.16836642cdd.Coremail.sssky307@163.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox