ldlinux: Add prototype for new_linux_kernel()
authorMatt Fleming <matt.fleming@intel.com>
Mon, 2 Apr 2012 16:07:59 +0000 (17:07 +0100)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 17 Apr 2012 09:58:34 +0000 (10:58 +0100)
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>
com32/elflink/ldlinux/config.h
com32/elflink/ldlinux/execute.c

index 1e78c2c..cab4c70 100644 (file)
@@ -42,4 +42,6 @@ extern void print_labels(const char *prefix, size_t len);
 
 extern void eprintf(const char *filename, ...);
 
+extern int new_linux_kernel(char *okernel, char *ocmdline);
+
 #endif /* __CONFIG_H__ */
index 9a17cf5..afe999e 100644 (file)
@@ -20,6 +20,7 @@
 #include "core.h"
 #include "menu.h"
 #include "fs.h"
+#include "config.h"
 
 /* Must match enum kernel_type */
 const char *const kernel_types[] = {
@@ -105,7 +106,7 @@ void execute(const char *cmdline, enum kernel_type type)
        } else {
                /* Need add one item for kernel load, as we don't use
                * the assembly runkernel.inc any more */
-               new_linux_kernel(kernel, cmdline);
+               new_linux_kernel((char *)kernel, (char *)cmdline);
        }
 
        lfree((void *)kernel);