I just looked into a shell2 crash that I often encounter and it turns out
that the call to GetDevicePathsForImageAndFile() in
ShellPkg/Application/Shell/Shell.c returns an error (ie. some file system
doesn't give up its device and file path info properly?) and then the shell
asserts. Shell1 never got this information either but it was able to
proceed without a problem. In shell1 (and in shell2 if I comment out the
assert) the following code in startup.nsh works fine:
for %a in 3 2 1 0
if exist fs%a:\startup.nsh then
fs%a:
endif
endfor
meaning that with no dev or file path info the shell looks for and finds
startup.nsh in the default filesystem, and can then set the default device
to wherever the first startup.nsh is found. Sloppy yes, but far better
than a crash.
I want to encourage only using asserts in cases where proceeding is
impossible.
Duane
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel