[PATCH] Prototype ifdown() in kexec.h, not nested in main().

Jamey Sharp jamey at thetovacompany.com
Thu May 15 20:12:58 EDT 2008


Signed-off-by: Jamey Sharp <jamey at thetovacompany.com>
---
Another generic patch extracted from my Windows porting work.

 kexec/kexec.c |    3 +--
 kexec/kexec.h |    2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index f898428..de9765e 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -956,8 +956,7 @@ int main(int argc, char *argv[])
 		sync();
 	}
 	if ((result == 0) && do_ifdown) {
-		extern int ifdown(void);
-		(void)ifdown();
+		ifdown();
 	}
 	if ((result == 0) && do_exec) {
 		result = my_exec();
diff --git a/kexec/kexec.h b/kexec/kexec.h
index 2d3a748..9b45476 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -209,6 +209,8 @@ extern unsigned long add_buffer_phys_virt(struct kexec_info *info,
 	int buf_end, int phys);
 extern void arch_reuse_initrd(void);
 
+extern int ifdown(void);
+
 extern unsigned char purgatory[];
 extern size_t purgatory_size;
 
-- 
1.5.4.1




More information about the kexec mailing list