[syslinux:elflink] ldlinux: Add prototype for new_linux_kernel()

syslinux-bot for Matt Fleming matt.fleming at intel.com
Tue Apr 17 11:24:15 PDT 2012


Commit-ID:  5dd53846001c7cd483ed32207f53a54977f9a11f
Gitweb:     http://www.syslinux.org/commit/5dd53846001c7cd483ed32207f53a54977f9a11f
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Mon, 2 Apr 2012 17:07:59 +0100
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Tue, 17 Apr 2012 10:58:34 +0100

ldlinux: Add prototype for new_linux_kernel()

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 at intel.com>

---
 com32/elflink/ldlinux/config.h  |    2 ++
 com32/elflink/ldlinux/execute.c |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/com32/elflink/ldlinux/config.h b/com32/elflink/ldlinux/config.h
index 1e78c2c..cab4c70 100644
--- a/com32/elflink/ldlinux/config.h
+++ b/com32/elflink/ldlinux/config.h
@@ -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__ */
diff --git a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c
index 9a17cf5..afe999e 100644
--- a/com32/elflink/ldlinux/execute.c
+++ b/com32/elflink/ldlinux/execute.c
@@ -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);


More information about the Syslinux-commits mailing list