diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-03-16 12:53:58 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-03-16 12:53:58 -0700 |
commit | 8c576f1fe03e34879921311f46613a35c6530000 (patch) | |
tree | 7eacb2c747d6778cde4e3e1a45a4c51372725e2a /com32/elflink/ldlinux | |
parent | 1c5f52052c2452c159498fb1beb941d3b40d4661 (diff) | |
parent | d8ed6505926c83a309ebc946f5795781a2392f7c (diff) | |
download | syslinux-8c576f1fe03e34879921311f46613a35c6530000.tar.gz syslinux-8c576f1fe03e34879921311f46613a35c6530000.tar.xz syslinux-8c576f1fe03e34879921311f46613a35c6530000.zip |
Merge remote-tracking branch 'mfleming/for-hpa/elflink/fix-compiler-warnings' into elflink
Diffstat (limited to 'com32/elflink/ldlinux')
-rw-r--r-- | com32/elflink/ldlinux/Makefile | 2 | ||||
-rw-r--r-- | com32/elflink/ldlinux/cli.c | 5 | ||||
-rw-r--r-- | com32/elflink/ldlinux/colors.c | 1 | ||||
-rw-r--r-- | com32/elflink/ldlinux/config.h | 4 | ||||
-rw-r--r-- | com32/elflink/ldlinux/getadv.c | 2 | ||||
-rw-r--r-- | com32/elflink/ldlinux/ldlinux.c | 4 | ||||
-rw-r--r-- | com32/elflink/ldlinux/readconfig.c | 22 |
7 files changed, 13 insertions, 27 deletions
diff --git a/com32/elflink/ldlinux/Makefile b/com32/elflink/ldlinux/Makefile index 339e13ee..f9606934 100644 --- a/com32/elflink/ldlinux/Makefile +++ b/com32/elflink/ldlinux/Makefile @@ -13,7 +13,7 @@ topdir = ../../.. include ../modules/MCONFIG -CFLAGS += -I../modules -I$(topdir)/core/elflink +CFLAGS += -I../modules -I$(topdir)/core/elflink -I$(topdir)/core/include all: ldlinux.c32 diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index defc6d0f..172a9f68 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -454,7 +454,7 @@ void process_command(const char *cmd, bool history) // dprintf("raw cmd = %s", cmd); strcpy(temp_cmd, cmd); - module_name = strtok(cmd, COMMAND_DELIM); + module_name = strtok((char *)cmd, COMMAND_DELIM); len_mn = strlen(module_name); if (!strcmp(module_name + len_mn - 4, ".c32")) { @@ -473,7 +473,7 @@ void process_command(const char *cmd, bool history) } while (argc < MAX_COMMAND_ARGS); argv[argc] = NULL; module_load_dependencies(module_name, MODULES_DEP); - spawn_load(module_name, argv); + spawn_load(module_name, (const char **)argv); } else if (!strcmp(module_name + len_mn - 2, ".0")) { execute(cmd, KT_PXE); } else if (!strcmp(module_name + len_mn - 3, ".bs")) { @@ -494,7 +494,6 @@ void process_command(const char *cmd, bool history) else execute(temp_cmd, KT_KERNEL); -cleanup: free(argv); free(temp_cmd); } diff --git a/com32/elflink/ldlinux/colors.c b/com32/elflink/ldlinux/colors.c index 68732bdb..c1ef3904 100644 --- a/com32/elflink/ldlinux/colors.c +++ b/com32/elflink/ldlinux/colors.c @@ -14,6 +14,7 @@ #include <string.h> #include <stdio.h> #include <colortbl.h> +#include <core-elf.h> #include "menu.h" /* diff --git a/com32/elflink/ldlinux/config.h b/com32/elflink/ldlinux/config.h index 77652663..37c57da1 100644 --- a/com32/elflink/ldlinux/config.h +++ b/com32/elflink/ldlinux/config.h @@ -33,7 +33,7 @@ extern short vkernel; //have we seen any "label" statements? extern short displaycon; //conio.inc extern short nohalt; //idle.inc -extern char *default_cmd; //"default" command line -extern char *onerror; //"onerror" command line +extern const char *default_cmd; //"default" command line +extern const char *onerror; //"onerror" command line #endif /* __CONFIG_H__ */ diff --git a/com32/elflink/ldlinux/getadv.c b/com32/elflink/ldlinux/getadv.c index 456084b0..5578313e 100644 --- a/com32/elflink/ldlinux/getadv.c +++ b/com32/elflink/ldlinux/getadv.c @@ -39,7 +39,7 @@ const void *syslinux_getadv(int tag, size_t * size) { const uint8_t *p; - size_t left, len; + size_t left; p = syslinux_adv_ptr(); left = syslinux_adv_size(); diff --git a/com32/elflink/ldlinux/ldlinux.c b/com32/elflink/ldlinux/ldlinux.c index 5ebbd7fc..85066b19 100644 --- a/com32/elflink/ldlinux/ldlinux.c +++ b/com32/elflink/ldlinux/ldlinux.c @@ -1,6 +1,7 @@ #include <linux/list.h> #include <sys/times.h> #include <stdbool.h> +#include <core.h> #include <core-elf.h> #include "cli.h" #include "console.h" @@ -12,8 +13,7 @@ static void enter_cmdline(void) { - struct cli_command *aux; - char *cmdline; + const char *cmdline; /* Enter endless command line prompt, should support "exit" */ while (1) { diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c index 898ee19a..e13d6d47 100644 --- a/com32/elflink/ldlinux/readconfig.c +++ b/com32/elflink/ldlinux/readconfig.c @@ -59,8 +59,8 @@ short vkernel = 0; //have we seen any "label" statements? short displaycon = 1; //conio.inc short nohalt = 1; //idle.inc -char *default_cmd = NULL; //"default" command line -char *onerror = NULL; //"onerror" command line +const char *default_cmd = NULL; //"default" command line +const char *onerror = NULL; //"onerror" command line /* Empty refstring */ const char *empty_string; @@ -75,7 +75,7 @@ long long totaltimeout = 0; /* Keep track of global default */ static int has_ui = 0; /* DEFAULT only counts if UI is found */ -extern char *globaldefault; +extern const char *globaldefault; static bool menusave = false; /* True if there is any "menu save" */ /* Linked list of all entires, hidden or not; used by unlabel() */ @@ -568,7 +568,7 @@ uint32_t parse_argb(char **p) * same way as if the files had been concatenated together. */ //static const char *append = NULL; -extern char *append; +extern const char *append; //static unsigned int ipappend = 0; unsigned int ipappend = 0; static struct labeldata ld; @@ -1056,7 +1056,6 @@ do_include: static int parse_one_config(const char *filename) { FILE *f; - int i; /* if (!strcmp(filename, "~")) @@ -1107,24 +1106,11 @@ static void resolve_gotos(void) } } -static void dump_menu(struct menu *menu) -{ - dprintf("will dump menu for %s:", menu->label); - printf("entries num: %d\n", menu->nentries); - printf("defentry: %d, nam = %s\n", - menu->defentry, menu->menu_entries[menu->defentry]->label); - printf("save: %d\n", menu->save); - //printf("", menu->); - //printf("", menu->); - //printf("", menu->); -} - void parse_configs(char **argv) { const char *filename; struct menu *m; struct menu_entry *me; - char *cmdline; dprintf("enter"); empty_string = refstrdup(""); |