Michael, On 06/24/13 15:12, Laszlo Ersek wrote:
> On the other hand, I think we should implement this more simply. What do > you think of the attached patch? Self-NAK for that, it's broken. PlatformBdsRestoreNvVarsFromHardDisk VisitAllInstancesOfProtocol -- for each Simple File System; per-fs errors are ignored: VisitingFileSystemInstance -- do nothing after first Save success, otherwise: ConnectNvVarsToFileSystem LoadNvVarsFromFs SaveNvVarsToFs ConnectNvVarsToFileSystem() runs once for each Simple File System. My patch sets the "NvVars" variable when visiting the first FS (even if that FS has no NvVars file, and even if the subsequent SaveNvVarsToFs() fails on that FS, for example because it's read-only). This prevents loading the variables from the second, third etc. FS that might have an NvVars file. Your patch is immune, I've tested it. On a read-only FS, the SaveNvVarsToFs() call, and the new (= 2nd) LoadNvVarsFromFs() that you introduce, fail both. Hence the loop can continue meaningfully. My R-b stands for your patch. Thanks! Laszlo ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel