Hello,
Following instructions from Jaben. Please guys, check this patch.
=======================================================
ShellPkg: Improvements in space handling
Improvements in space handling at command lines to accept tab (\t)
as a space.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leandro G. B. Becker <lbec...@positivo.com.br>
=======================================================
Thank you!
Leandro Becker
>>> Em Quinta, 26 de Junho de 2014 às 14:14, na mensagem
<cb6e33457884fa40993f35157061515c4117d...@fmsmsx103.amr.corp.intel.com>,
"Carsey, Jaben" <jaben.car...@intel.com> gravou:
Looks good. You need to send it to the EDKII mailing list reflector
for official submission.
From:Leandro Becker [mailto:lbec...@positivo.com.br]
Sent: Wednesday, June 25, 2014 2:22 PM
To: Bjorge, Erik C; Carsey, Jaben
Subject: RE: Enc.: [edk2] [PATCH] - ShellPkg: Some improvements in
space handling, "if" command and user input reading
Importance: High
Hello,
No problem Jaben! Sorry about my delay.
1. The patch is attached;
2. Well, I changed the shell to suit our needs here in our company (I
made a lot of customizations, this was one of them), so we can live with
that ;)
3. I agree with you, the problem we have is explain and enforce this
with the ODMs. So I changed "our shell" to support this.
If you want, I made changes to the set command allowing the user input
the value for the variable, like DOS set -p. If you think this is useful
to the Tianocore, I can send another patch later. I do not know if those
kind of "extensions" will also break the spec.
=======================================================
ShellPkg: Improvements in space handling
Improvements in space handling at command lines to accept tab (\t)
as a space.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leandro G. B. Becker <lbec...@positivo.com.br>
=======================================================
Best Regards,
Leandro Becker
Positivo Informática S.A
>>> Em Quarta, 18 de Junho de 2014 às 13:31, na mensagem
<cb6e33457884fa40993f35157061515c41165...@fmsmsx103.amr.corp.intel.com>,
"Carsey, Jaben" <jaben.car...@intel.com> gravou:
Sorry,
I didn’t notice the first email. I like the idea of the changes.
1) I like this change. If you submit this as a separate patch I
think it would be fine.
2) The UEFI Shell spec clearly states that “if” tests for
files. We cannot extend that to a directory without updating the spec.
3) Doesn’t this actually violate the UEFI Spec since the event
must only happen when the keystroke is ready to be read?
-Jaben
From:Leandro Becker [mailto:lbec...@positivo.com.br]
Sent: Wednesday, June 18, 2014 4:17 AM
To: Bjorge, Erik C; Carsey, Jaben
Subject: Enc.: [edk2] [PATCH] - ShellPkg: Some improvements in space
handling, "if" command and user input reading
Importance: High
Hello guys,
Do yout think that my patch have something wrong or is not useful to
the project?
Nobody answered it, so I'm wondering if no one had the chance to look
it or if I made something off the standards.
Thank you very much!
Leandro Becker
>>> Em Segunda, 16 de Junho de 2014 às 11:54, na mensagem
<539edae0.25f2.00d...@positivo.com.br>, "Leandro Becker"
<lbec...@positivo.com.br> gravou:
Hello,
I made some improvements in ShellPkg that I think would be nice for
the
community.
=======================================================
ShellPkg: Improvements in space handling, "if" command also accepts
directory and user input reading.
1. Improvements in space handling at command lines to accept tab (\t)
as a space;
2. "If" command also accepts a directory when checking if a file
exists;
3. When waiting for user input, support some cases when a key event is
generated
but the device is not ready when the keystroke is read.
Just ignore the event and wait again for another key.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leandro G. B. Becker <lbec...@positivo.com.br>
=======================================================
Best regards to all!
Leandro G. B. Becker
Positivo Informática S.A.
--- a/ShellPkg/Application/Shell/ShellParametersProtocol.c Mon Jan 27
16:13:56 2014
+++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c Tue Jan 28
09:54:22 2014
@@ -49,7 +49,7 @@
//
// make sure we dont have any leading spaces
//
- while ((*Walker)[0] == L' ') {
+ while ((*Walker)[0] == L' ' || (*Walker)[0] == L'\t') {
(*Walker)++;
}
@@ -120,10 +120,10 @@
CopyMem(NextDelim, NextDelim+1, StrSize(NextDelim) -
sizeof(NextDelim[0]));
}
}
- while ((*TempParameter)[StrLen(*TempParameter)-1] == L' ') {
+ while ((*TempParameter)[StrLen(*TempParameter)-1] == L' ' ||
(*TempParameter)[StrLen(*TempParameter)-1] == L'\t') {
(*TempParameter)[StrLen(*TempParameter)-1] = CHAR_NULL;
}
- while ((*TempParameter)[0] == L' ') {
+ while ((*TempParameter)[0] == L' ' || (*TempParameter)[0] == L'\t') {
CopyMem(*TempParameter, (*TempParameter)+1, StrSize(*TempParameter) -
sizeof((*TempParameter)[0]));
}
}
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel