From 6fef95cd197003ab117d202c319c08bbad71c22a Mon Sep 17 00:00:00 2001
From: Andreas Faerber <andreas.faerber@web.de>
Date: Sun, 13 Jun 2010 17:00:45 +0200
Subject: [PATCH 3/3] Wire up net_stack_cleanup()
The NetStack.h header is currently not usable from C code. So while
net_stack_init() is called from platform code, we cannot call
net_stack_cleanup() from OpenFirmware's platform_start_kernel().
Thus call it directly from main()'s cleanup TODO, having assured
that the function is a no-op when no network stack was initialized.
---
src/system/boot/loader/main.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/system/boot/loader/main.cpp b/src/system/boot/loader/main.cpp
index db23ea9..d198d8f 100644
a
|
b
|
|
13 | 13 | #include <boot/platform.h> |
14 | 14 | #include <boot/heap.h> |
15 | 15 | #include <boot/stdio.h> |
| 16 | #include <boot/net/NetStack.h> |
16 | 17 | |
17 | 18 | #include <util/kernel_cpp.h> |
18 | 19 | |
… |
… |
main(stage2_args *args)
|
131 | 132 | memcpy(buffer, bootVolume.Buffer(), bootVolume.ContentSize()); |
132 | 133 | bootVolume.SetTo(buffer, bootVolume.ContentSize()); |
133 | 134 | |
| 135 | net_stack_cleanup(); |
134 | 136 | // ToDo: cleanup, heap_release() etc. |
135 | 137 | platform_start_kernel(); |
136 | 138 | } |