This will make the code work with the different styles of Kconfig (emit unset bools vs don't emit unset bools) Roughly, the patch does this, and a little bit of fixing up: perl -pi -e 's,ifdef (CONFIG_LP_.+?)\b,if IS_ENABLED\($1\),g' `find . -name *.[ch]` perl -pi -e 's,ifndef (CONFIG_LP_.+?)\b,if !IS_ENABLED\($1\),g' `find . -name *.[ch]` Change-Id: Ib8a839b056a1f806a8597052e1b571ea3d18a79f Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10711 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
		
			
				
	
	
		
			50 lines
		
	
	
		
			938 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			938 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* Public Domain Curses */
 | |
| /* This file is BSD licensed, Copyright 2011 secunet AG */
 | |
| 
 | |
| #include "lppdc.h"
 | |
| #include <curses.h>
 | |
| #include <libpayload.h>
 | |
| 
 | |
| int curses_flags = F_ENABLE_SERIAL | F_ENABLE_CONSOLE;
 | |
| 
 | |
| void PDC_beep(void)
 | |
| {
 | |
|     PDC_LOG(("PDC_beep() - called\n"));
 | |
| 
 | |
| #if IS_ENABLED(CONFIG_LP_SPEAKER)
 | |
|     speaker_tone(1760, 500); /* 1760 == note A6 */
 | |
| #endif
 | |
| }
 | |
| 
 | |
| void PDC_napms(int ms)
 | |
| {
 | |
|     PDC_LOG(("PDC_napms() - called: ms=%d\n", ms));
 | |
| 
 | |
|     mdelay(ms);
 | |
| }
 | |
| 
 | |
| const char *PDC_sysname(void)
 | |
| {
 | |
|     return "LIBPAYLOAD";
 | |
| }
 | |
| 
 | |
| void curses_enable_serial(int enable)
 | |
| {
 | |
|     curses_flags = (curses_flags & ~F_ENABLE_SERIAL) | (enable * F_ENABLE_SERIAL);
 | |
| }
 | |
| 
 | |
| void curses_enable_vga(int enable)
 | |
| {
 | |
|     curses_flags = (curses_flags & ~F_ENABLE_CONSOLE) | (enable * F_ENABLE_CONSOLE);
 | |
| }
 | |
| 
 | |
| int curses_serial_enabled(void)
 | |
| {
 | |
|     return !!(curses_flags & F_ENABLE_SERIAL);
 | |
| }
 | |
| 
 | |
| int curses_vga_enabled(void)
 | |
| {
 | |
|     return !!(curses_flags & F_ENABLE_CONSOLE);
 | |
| }
 |