From a17b68dad4f461b36f3cb6cd9d3787acec14af7a 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 4/4] 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/PathBlacklist.h> |
16 | 16 | #include <boot/stdio.h> |
| 17 | #include <boot/net/NetStack.h> |
17 | 18 | |
… |
… |
main(stage2_args *args)
|
144 | 145 | |
| 146 | net_stack_cleanup(); |
145 | 147 | // ToDo: cleanup, heap_release() etc. |
146 | 148 | heap_print_statistics(); |
147 | 149 | platform_start_kernel(); |
148 | 150 | } |