I believe there is a bug  in something i see in the UDK code I have 
(UDK2010.SR1.UP1).
It appears to me as though either the 'CompareGuid' routine should be
returning the opposite of what it is, or the tests using the variable IsFfs3Fv 
should be modified:

i.e.,:
in FwVol.c

  IsFfs3Fv = CompareGuid (&FwVolHeader->FileSystemGuid, 
&gEfiFirmwareFileSystem3Guid);
...

    if (IS_FFS_FILE2 (*FileHeader)) {
      if (!IsFfs3Fv) {
        DEBUG ((EFI_D_ERROR, "It is a FFS3 formatted file: %g in a non-FFS3 
formatted FV.\n", &(*FileHeader)->Name));
      }
      FileLength = FFS_FILE2_SIZE (*FileHeader);
...

and CompareGuid says:
                //Returns:
                //  =  0  if Guid1 == Guid2
                //  != 0  if Guid1 != Guid2

so if FwVolHeader->FileSystemGuid == gEfiFirmwareFileSystem3Guid then
IsFfs3Fv will be 0 if FwVolHeader->FileSystemGuid is a FFS3

(which makes 'IsFfs3Fv' seems as though it should have been named 'IsNotFfs3Fv'

and therefore the test:
                if (!IsFfs3Fv) {
                                .. do something if not FFS3

should be
FwVolHeader->FileSystemGuid
                if (IsFfs3Fv) {
                                .. do something if not FFS3

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to