tools/mkeficapsule.c: fix DEBUG build
PATCH 1/1 tools/mkeficapsule.c: fix DEBUG build
Fix a missing comma sign (,) from a printf(), that is only reachable if DEBUG is defined, in which case the build fails with:
tools/mkeficapsule.c:266:36: error: expected ?)? before ?bin?
266 | printf("\tbin: %s\n\ttype: %pUl\n" bin, guid);
| ^~~~
| )--- tools/mkeficapsule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/mkeficapsule.c +1 -1
@@ -263,7 +263,7 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid,#ifdef DEBUG printf ("For output: %s\n" , path); -printf ("\tbin: %s\n\ttype: %pUl\n" bin, guid); +printf ("\tbin: %s\n\ttype: %pUl\n" , bin, guid);printf ("\tindex: %ld\n\tinstance: %ld\n" , index, instance);#endif
Signature · 1 line
2.25.1
PATCH 1/1 tools/mkeficapsule.c: fix DEBUG build
Quoted 18 lines · Klaus Heinrich Kiwi
Fix a missing comma sign (,) from a
printf(), that is only reachable if DEBUG is defined, in which case the build fails with:tools/mkeficapsule.c:266:36: error: expected ?)? before ?bin? 266 | printf("\tbin: %s\n\ttype: %pUl\n" bin, guid); | ^~~~ | )Signed-off-by Klaus Heinrich Kiwi <[email protected]>--- tools/mkeficapsule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/mkeficapsule.c +0
-0
tools/mkeficapsule.c static int create_fwbin(char *path, char *bin, efi_guid_t *guid, · line 264
Quoted 2 lines
tools/mkeficapsule.c +0
-0@@ -263,7 +263,7 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid,#ifdef DEBUG
Thank you for pointing out the issue.
"#ifdef DEBUG printf()" is not how we want to add debug output in U-Boot. Please, use log_debug() instead of the three printf() statements.
Add
#define LOG_CATEGORY LOGC_EFI
before all includes.
Add
#include <log.h>
in the includes section.
Please, add Alex and me to the next version of the patch.
Best regards
Heinrich
Quoted 7 lines
tools/mkeficapsule.c +1
-1printf ("For output: %s\n" , path); -printf ("\tbin: %s\n\ttype: %pUl\n" bin, guid); +printf ("\tbin: %s\n\ttype: %pUl\n" , bin, guid);printf ("\tindex: %ld\n\tinstance: %ld\n" , index, instance);#endif
PATCH 1/1 tools/mkeficapsule.c: fix DEBUG build
Quoted 34 lines · Heinrich Schuchardt
Quoted 20 lines · Klaus Heinrich Kiwi
Fix a missing comma sign (,) from a
printf(), that is only reachable if DEBUG is defined, in which case the build fails with:????
tools/mkeficapsule.c:266:36: error: expected ?)? before ?bin??????? 266 |? printf("\tbin: %s\n\ttype: %pUl\n" bin, guid); ?????????? |??????????????????????????????????? ^~~~ ?????????? |??????????????????????????????????? )Signed-off-by Klaus Heinrich Kiwi <[email protected]>---
?tools/mkeficapsule.c| 2 +-
? 1 file changed, 1 insertion(+), 1 deletion(-)tools/mkeficapsule.c +0
-0@@ -263,7 +263,7 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid,Quoted 1 line
? #ifdef DEBUG
Thank you for pointing out the issue.
"#ifdef DEBUG
printf()" is not how we want to add debug output in U-Boot. Please, uselog_debug()instead of the threeprintf()statements.Add
??? #define
LOG_CATEGORYLOGC_EFIbefore all includes.
Quoted 7 lines
Add
??? #include <
log.h>in the includes section.
Please, add Alex and me to the next version of the patch.
Sorry, this is a Linux binary and not main U-Boot code.
Quoted 13 lines
Best regards
Heinrich
Quoted 7 lines
?????
printf("For output: %s\n", path);
-???printf("\tbin: %s\n\ttype: %pUl\n" bin, guid); +???printf("\tbin: %s\n\ttype: %pUl\n", bin, guid); ?????printf("\tindex: %ld\n\tinstance: %ld\n", index, instance); ? #endif