aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/config.h
Commit message (Collapse)AuthorAgeFilesLines
* ldlinux: Reset the console whenever we execute a moduleMatt Fleming2012-11-271-0/+1
| | | | | | | | Each module expects the console to start in text mode and will make explicit calls to openconsole() when another console is required, e.g. in vesamenu.c32. This mimics the behaviour found in 4.0x. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Automatically apply ".c32" extension for COM32 filesMatt Fleming2012-11-261-0/+1
| | | | | | | | | | | If a type-specifier is used on the command line, e.g. .com32 pwd we should apply the ".c32" filename extension automatically as this works elsewhere and this behaviour was present in 4.0x. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Fix logic if no DEFAULT or UI directive is foundMatt Fleming2012-11-021-1/+1
| | | | | | | | | | | | | | Somewhere along the way the code that prints, No DEFAULT or UI configuration directive found! was broken, and now no longer prints at all. While we're fixing this it's a good opportunity to rework the logic to be clearer. Now we only print the message if a config file was found, since these directives are obviously missing if there is no config file (a warning will be printed about the lack of config file anyway). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Return to command prompt after loading COM32Matt Fleming2012-08-021-0/+2
| | | | | | | | | | | | | The old COM32 loading code would drop the user at a command prompt once execution returned from the COM32 amodule. We need to replicate this because most callers of execute() don't expect it to return. This bug was noticed when loading a COM32 module from vesamenu.c32. Once execution returned from the COM32 module the display became garbled because no code exists to reinitialise the screen for VGA. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* elflink: Fix boot sector bootingMatt Fleming2012-06-071-0/+2
| | | | | | | | | | | | | This adds missing support for booting from a boot sector file such as .bs, .bss or .0, by re-implementing the old asm bootsec code from core/bootsect.inc in C. This has resulted in some external changes. We've had to make StackBuf a global symbol because we access it directly from execute.c. Also, we need to move dsinfo.c into MINLIBOBJS because ldlinux now needs to reference __syslinux_derivative_info. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* elflink: Fix TIMEOUT and TOTALTIMEOUT handlingMatt Fleming2012-05-031-0/+1
| | | | | | | | | | | | Paulo reported that his default command line wasn't being executed when the timeout specified in his config file elapsed. This is because mygetkey() wasn't correctly applying the timeout when waiting for input. Furthermore, it seems the ONTIMEOUT parsing was also broken. Reported-by: Paulo Alcantara <pcacjr@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Add prototype for new_linux_kernel()Matt Fleming2012-04-171-0/+2
| | | | | | | | | Make sure we're passing the correct arguments to new_linux_kernel() by defining a prototype. This also fixes the following warning, execute.c:108:3: warning: implicit declaration of function ‘new_linux_kernel’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Add print_labels() prototype to config.hMatt Fleming2012-04-171-0/+1
| | | | | | | | | ... to fix the following build warning, cli.c: In function ‘edit_cmdline’: cli.c:411:3: warning: implicit declaration of function ‘print_labels’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Include headers for function prototypesMatt Fleming2012-04-171-0/+1
| | | | | | | | | | | | | Include the appropriate headers to fix up the following build warnings, ldlinux.c: In function ‘parse_kernel_type’: ldlinux.c:27:2: warning: implicit declaration of function ‘strncmp’ ldlinux.c: In function ‘load_kernel’: ldlinux.c:64:2: warning: implicit declaration of function ‘find_label’ ldlinux.c:64:5: warning: assignment makes pointer from integer without a cast Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux: Add eprintf() to print to VGA and serialMatt Fleming2011-12-021-0/+2
| | | | | | | | | printf() is used heavily in the ldlinux code but that only displays things on the VGA console, not on serial. Introduce eprintf(), which gives us the benefit of format strings but will also print to both VGA and serial. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* ldlinux, cli: Add support for F-keysMatt Fleming2011-04-011-0/+2
| | | | | | | | | | | | | The old asm command-line interface had support for printing files containing help messages when the F-keys (F1-F10) were pressed. Add this support to ldlinux. The config parser already had support for parsing config files with F-key directives and the cli code already had support for executing callbacks when one of the F-keys was hit, so this patch simply glues all the pieces together and provides a function to cat the help file. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* ldlinux: Sprinkle const type qualifersMatt Fleming2011-03-161-2/+2
| | | | | | | | | | | | | | | | The following warnings are all caused because we're assigning from const char * to char *. As the strings are never modified, it makes sense to add the const type qualifer instead of casting away const. readconfig.c: In function ‘parse_config_file’: readconfig.c:708:11: warning: assignment discards qualifiers from pointer target type readconfig.c:937:10: warning: assignment discards qualifiers from pointer target type readconfig.c:987:20: warning: assignment discards qualifiers from pointer target type readconfig.c:998:15: warning: assignment discards qualifiers from pointer target type readconfig.c:1004:18: warning: assignment discards qualifiers from pointer target type readconfig.c:1041:11: warning: assignment discards qualifiers from pointer target type Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* ldlinux: Parse and store the "onerror" command lineMatt Fleming2011-03-091-0/+1
| | | | | | | If we fail to load a kernel and the parser found an "onerror" directive, execute the onerror command line. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* ldlinux: Record "default" and "ui" command linesMatt Fleming2011-03-091-0/+9
| | | | | | | | The command line following the "default" and "ui" options may be a kernel or com32 module to load and execute, so we need to record it for later processing. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* elflink: Move config data into config.hMatt Fleming2011-03-091-0/+29
Move some definitions that other compilation units need to know about into config.h. In subsequent patches ldlinux.c will use the global options set by readconfig.c to decide which kernel to boot. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>