parent
ad64e62de9
commit
aaaccf9d87
@ -48,6 +48,9 @@
|
|||||||
|
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "cpu-conf.h"
|
#include "cpu-conf.h"
|
||||||
|
#ifdef MODULE_NATIVENET
|
||||||
|
#include "tap.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "native_internal.h"
|
#include "native_internal.h"
|
||||||
|
|
||||||
@ -68,6 +71,14 @@ int reboot_arch(int mode)
|
|||||||
(void) mode;
|
(void) mode;
|
||||||
|
|
||||||
printf("\n\n\t\t!! REBOOT !!\n\n");
|
printf("\n\n\t\t!! REBOOT !!\n\n");
|
||||||
|
#ifdef MODULE_UART0
|
||||||
|
/* TODO: close stdio fds */
|
||||||
|
#endif
|
||||||
|
#ifdef MODULE_NATIVENET
|
||||||
|
if (_native_tap_fd != -1) {
|
||||||
|
real_close(_native_tap_fd);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (real_execve(_native_argv[0], _native_argv, NULL) == -1) {
|
if (real_execve(_native_argv[0], _native_argv, NULL) == -1) {
|
||||||
err(EXIT_FAILURE, "reboot: execve");
|
err(EXIT_FAILURE, "reboot: execve");
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
#define TAP_BUFFER_LENGTH (ETHER_MAX_LEN)
|
#define TAP_BUFFER_LENGTH (ETHER_MAX_LEN)
|
||||||
int _native_marshall_ethernet(uint8_t *framebuf, radio_packet_t *packet);
|
int _native_marshall_ethernet(uint8_t *framebuf, radio_packet_t *packet);
|
||||||
|
|
||||||
int _native_tap_fd;
|
int _native_tap_fd = -1;
|
||||||
unsigned char _native_tap_mac[ETHER_ADDR_LEN];
|
unsigned char _native_tap_mac[ETHER_ADDR_LEN];
|
||||||
|
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user