@@ -236,7 +236,7 @@ CollectAllocationsRestrictedTo32Bit (
236236 }
237237
238238 if (AddPointer -> PointeeFile [QEMU_LOADER_FNAME_SIZE - 1 ] != '\0' ) {
239- DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __FUNCTION__ ));
239+ DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __func__ ));
240240 Status = EFI_PROTOCOL_ERROR ;
241241 goto RollBack ;
242242 }
@@ -251,7 +251,7 @@ CollectAllocationsRestrictedTo32Bit (
251251 DEBUG ((
252252 DEBUG_VERBOSE ,
253253 "%a: restricting blob \"%a\" from 64-bit allocation\n" ,
254- __FUNCTION__ ,
254+ __func__ ,
255255 AddPointer -> PointeeFile
256256 ));
257257 break ;
@@ -328,15 +328,15 @@ ProcessCmdAllocate (
328328 BLOB * Blob ;
329329
330330 if (Allocate -> File [QEMU_LOADER_FNAME_SIZE - 1 ] != '\0' ) {
331- DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __FUNCTION__ ));
331+ DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __func__ ));
332332 return EFI_PROTOCOL_ERROR ;
333333 }
334334
335335 if (Allocate -> Alignment > EFI_PAGE_SIZE ) {
336336 DEBUG ((
337337 DEBUG_ERROR ,
338338 "%a: unsupported alignment 0x%x\n" ,
339- __FUNCTION__ ,
339+ __func__ ,
340340 Allocate -> Alignment
341341 ));
342342 return EFI_UNSUPPORTED ;
@@ -347,7 +347,7 @@ ProcessCmdAllocate (
347347 DEBUG ((
348348 DEBUG_ERROR ,
349349 "%a: QemuFwCfgFindFile(\"%a\"): %r\n" ,
350- __FUNCTION__ ,
350+ __func__ ,
351351 Allocate -> File ,
352352 Status
353353 ));
@@ -390,7 +390,7 @@ ProcessCmdAllocate (
390390 DEBUG ((
391391 DEBUG_ERROR ,
392392 "%a: duplicated file \"%a\"\n" ,
393- __FUNCTION__ ,
393+ __func__ ,
394394 Allocate -> File
395395 ));
396396 Status = EFI_PROTOCOL_ERROR ;
@@ -408,7 +408,7 @@ ProcessCmdAllocate (
408408 DEBUG_VERBOSE ,
409409 "%a: File=\"%a\" Alignment=0x%x Zone=%d Size=0x%Lx "
410410 "Address=0x%Lx\n" ,
411- __FUNCTION__ ,
411+ __func__ ,
412412 Allocate -> File ,
413413 Allocate -> Alignment ,
414414 Allocate -> Zone ,
@@ -460,7 +460,7 @@ ProcessCmdAddPointer (
460460 if ((AddPointer -> PointerFile [QEMU_LOADER_FNAME_SIZE - 1 ] != '\0' ) ||
461461 (AddPointer -> PointeeFile [QEMU_LOADER_FNAME_SIZE - 1 ] != '\0' ))
462462 {
463- DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __FUNCTION__ ));
463+ DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __func__ ));
464464 return EFI_PROTOCOL_ERROR ;
465465 }
466466
@@ -470,7 +470,7 @@ ProcessCmdAddPointer (
470470 DEBUG ((
471471 DEBUG_ERROR ,
472472 "%a: invalid blob reference(s) \"%a\" / \"%a\"\n" ,
473- __FUNCTION__ ,
473+ __func__ ,
474474 AddPointer -> PointerFile ,
475475 AddPointer -> PointeeFile
476476 ));
@@ -487,7 +487,7 @@ ProcessCmdAddPointer (
487487 DEBUG ((
488488 DEBUG_ERROR ,
489489 "%a: invalid pointer location or size in \"%a\"\n" ,
490- __FUNCTION__ ,
490+ __func__ ,
491491 AddPointer -> PointerFile
492492 ));
493493 return EFI_PROTOCOL_ERROR ;
@@ -500,7 +500,7 @@ ProcessCmdAddPointer (
500500 DEBUG ((
501501 DEBUG_ERROR ,
502502 "%a: invalid pointer value in \"%a\"\n" ,
503- __FUNCTION__ ,
503+ __func__ ,
504504 AddPointer -> PointerFile
505505 ));
506506 return EFI_PROTOCOL_ERROR ;
@@ -520,7 +520,7 @@ ProcessCmdAddPointer (
520520 DEBUG_ERROR ,
521521 "%a: relocated pointer value unrepresentable in "
522522 "\"%a\"\n" ,
523- __FUNCTION__ ,
523+ __func__ ,
524524 AddPointer -> PointerFile
525525 ));
526526 return EFI_PROTOCOL_ERROR ;
@@ -532,7 +532,7 @@ ProcessCmdAddPointer (
532532 DEBUG_VERBOSE ,
533533 "%a: PointerFile=\"%a\" PointeeFile=\"%a\" "
534534 "PointerOffset=0x%x PointerSize=%d\n" ,
535- __FUNCTION__ ,
535+ __func__ ,
536536 AddPointer -> PointerFile ,
537537 AddPointer -> PointeeFile ,
538538 AddPointer -> PointerOffset ,
@@ -568,7 +568,7 @@ ProcessCmdAddChecksum (
568568 BLOB * Blob ;
569569
570570 if (AddChecksum -> File [QEMU_LOADER_FNAME_SIZE - 1 ] != '\0' ) {
571- DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __FUNCTION__ ));
571+ DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __func__ ));
572572 return EFI_PROTOCOL_ERROR ;
573573 }
574574
@@ -577,7 +577,7 @@ ProcessCmdAddChecksum (
577577 DEBUG ((
578578 DEBUG_ERROR ,
579579 "%a: invalid blob reference \"%a\"\n" ,
580- __FUNCTION__ ,
580+ __func__ ,
581581 AddChecksum -> File
582582 ));
583583 return EFI_PROTOCOL_ERROR ;
@@ -591,7 +591,7 @@ ProcessCmdAddChecksum (
591591 DEBUG ((
592592 DEBUG_ERROR ,
593593 "%a: invalid checksum range in \"%a\"\n" ,
594- __FUNCTION__ ,
594+ __func__ ,
595595 AddChecksum -> File
596596 ));
597597 return EFI_PROTOCOL_ERROR ;
@@ -605,7 +605,7 @@ ProcessCmdAddChecksum (
605605 DEBUG_VERBOSE ,
606606 "%a: File=\"%a\" ResultOffset=0x%x Start=0x%x "
607607 "Length=0x%x\n" ,
608- __FUNCTION__ ,
608+ __func__ ,
609609 AddChecksum -> File ,
610610 AddChecksum -> ResultOffset ,
611611 AddChecksum -> Start ,
@@ -654,7 +654,7 @@ ProcessCmdWritePointer (
654654 if ((WritePointer -> PointerFile [QEMU_LOADER_FNAME_SIZE - 1 ] != '\0' ) ||
655655 (WritePointer -> PointeeFile [QEMU_LOADER_FNAME_SIZE - 1 ] != '\0' ))
656656 {
657- DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __FUNCTION__ ));
657+ DEBUG ((DEBUG_ERROR , "%a: malformed file name\n" , __func__ ));
658658 return EFI_PROTOCOL_ERROR ;
659659 }
660660
@@ -668,7 +668,7 @@ ProcessCmdWritePointer (
668668 DEBUG ((
669669 DEBUG_ERROR ,
670670 "%a: invalid fw_cfg file or blob reference \"%a\" / \"%a\"\n" ,
671- __FUNCTION__ ,
671+ __func__ ,
672672 WritePointer -> PointerFile ,
673673 WritePointer -> PointeeFile
674674 ));
@@ -684,7 +684,7 @@ ProcessCmdWritePointer (
684684 DEBUG ((
685685 DEBUG_ERROR ,
686686 "%a: invalid pointer location or size in \"%a\"\n" ,
687- __FUNCTION__ ,
687+ __func__ ,
688688 WritePointer -> PointerFile
689689 ));
690690 return EFI_PROTOCOL_ERROR ;
@@ -693,7 +693,7 @@ ProcessCmdWritePointer (
693693 PointeeBlob = OrderedCollectionUserStruct (PointeeEntry );
694694 PointerValue = WritePointer -> PointeeOffset ;
695695 if (PointerValue >= PointeeBlob -> Size ) {
696- DEBUG ((DEBUG_ERROR , "%a: invalid PointeeOffset\n" , __FUNCTION__ ));
696+ DEBUG ((DEBUG_ERROR , "%a: invalid PointeeOffset\n" , __func__ ));
697697 return EFI_PROTOCOL_ERROR ;
698698 }
699699
@@ -710,7 +710,7 @@ ProcessCmdWritePointer (
710710 DEBUG ((
711711 DEBUG_ERROR ,
712712 "%a: pointer value unrepresentable in \"%a\"\n" ,
713- __FUNCTION__ ,
713+ __func__ ,
714714 WritePointer -> PointerFile
715715 ));
716716 return EFI_PROTOCOL_ERROR ;
@@ -731,7 +731,7 @@ ProcessCmdWritePointer (
731731 DEBUG_VERBOSE ,
732732 "%a: PointerFile=\"%a\" PointeeFile=\"%a\" "
733733 "PointerOffset=0x%x PointeeOffset=0x%x PointerSize=%d\n" ,
734- __FUNCTION__ ,
734+ __func__ ,
735735 WritePointer -> PointerFile ,
736736 WritePointer -> PointeeFile ,
737737 WritePointer -> PointerOffset ,
@@ -777,7 +777,7 @@ UndoCmdWritePointer (
777777 DEBUG ((
778778 DEBUG_VERBOSE ,
779779 "%a: PointerFile=\"%a\" PointerOffset=0x%x PointerSize=%d\n" ,
780- __FUNCTION__ ,
780+ __func__ ,
781781 WritePointer -> PointerFile ,
782782 WritePointer -> PointerOffset ,
783783 WritePointer -> PointerSize
@@ -908,7 +908,7 @@ Process2ndPassCmdAddPointer (
908908 DEBUG ((
909909 DEBUG_VERBOSE ,
910910 "%a: PointerValue=0x%Lx already processed, skipping.\n" ,
911- __FUNCTION__ ,
911+ __func__ ,
912912 PointerValue
913913 ));
914914 Status = EFI_SUCCESS ;
@@ -922,7 +922,7 @@ Process2ndPassCmdAddPointer (
922922 DEBUG_VERBOSE ,
923923 "%a: checking for ACPI header in \"%a\" at 0x%Lx "
924924 "(remaining: 0x%Lx): " ,
925- __FUNCTION__ ,
925+ __func__ ,
926926 AddPointer -> PointeeFile ,
927927 PointerValue ,
928928 (UINT64 )Blob2Remaining
@@ -997,7 +997,7 @@ Process2ndPassCmdAddPointer (
997997 DEBUG ((
998998 DEBUG_ERROR ,
999999 "%a: can't install more than %d tables\n" ,
1000- __FUNCTION__ ,
1000+ __func__ ,
10011001 INSTALLED_TABLES_MAX
10021002 ));
10031003 Status = EFI_OUT_OF_RESOURCES ;
@@ -1014,7 +1014,7 @@ Process2ndPassCmdAddPointer (
10141014 DEBUG ((
10151015 DEBUG_ERROR ,
10161016 "%a: InstallAcpiTable(): %r\n" ,
1017- __FUNCTION__ ,
1017+ __func__ ,
10181018 Status
10191019 ));
10201020 goto RollbackSeenPointer ;
@@ -1081,7 +1081,7 @@ InstallQemuFwCfgTables (
10811081 DEBUG ((
10821082 DEBUG_ERROR ,
10831083 "%a: \"etc/table-loader\" has invalid size 0x%Lx\n" ,
1084- __FUNCTION__ ,
1084+ __func__ ,
10851085 (UINT64 )FwCfgSize
10861086 ));
10871087 return EFI_PROTOCOL_ERROR ;
@@ -1158,7 +1158,7 @@ InstallQemuFwCfgTables (
11581158 DEBUG ((
11591159 DEBUG_VERBOSE ,
11601160 "%a: unknown loader command: 0x%x\n" ,
1161- __FUNCTION__ ,
1161+ __func__ ,
11621162 LoaderEntry -> Type
11631163 ));
11641164 break ;
@@ -1211,7 +1211,7 @@ InstallQemuFwCfgTables (
12111211 AcpiProtocol -> UninstallAcpiTable (AcpiProtocol , InstalledKey [Installed ]);
12121212 }
12131213 } else {
1214- DEBUG ((DEBUG_INFO , "%a: installed %d tables\n" , __FUNCTION__ , Installed ));
1214+ DEBUG ((DEBUG_INFO , "%a: installed %d tables\n" , __func__ , Installed ));
12151215 }
12161216
12171217 for (SeenPointerEntry = OrderedCollectionMin (SeenPointers );
@@ -1261,7 +1261,7 @@ InstallQemuFwCfgTables (
12611261 DEBUG ((
12621262 DEBUG_VERBOSE ,
12631263 "%a: freeing \"%a\"\n" ,
1264- __FUNCTION__ ,
1264+ __func__ ,
12651265 Blob -> File
12661266 ));
12671267 gBS -> FreePages ((UINTN )Blob -> Base , EFI_SIZE_TO_PAGES (Blob -> Size ));
0 commit comments