5
Last change
on this file since 73d892d8 was
f703e7f,
checked in by Sebastian Huber <sebastian.huber@…>, on 10/26/17 at 11:59:05
|
tests: Move rtems_test_printer definition
Statically initialize it to use printk().
Update #3170.
Update #3199.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2012. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.org/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifdef HAVE_CONFIG_H |
---|
11 | #include "config.h" |
---|
12 | #endif |
---|
13 | |
---|
14 | #define TEST_INIT |
---|
15 | |
---|
16 | #include <stdio.h> |
---|
17 | #include <stdlib.h> |
---|
18 | #include <string.h> |
---|
19 | |
---|
20 | #define CONFIGURE_INIT |
---|
21 | #include "system.h" |
---|
22 | |
---|
23 | #include <rtems/rtems_bsdnet.h> |
---|
24 | #include <rtems/rtemspppd.h> |
---|
25 | #include <rtems/shell.h> |
---|
26 | #include "netconfig.h" |
---|
27 | |
---|
28 | const char rtems_test_name[] = "PPPD"; |
---|
29 | |
---|
30 | static void notification(int fd, int seconds_remaining, void *arg) |
---|
31 | { |
---|
32 | printf( |
---|
33 | "Press any key to start pppd (%is remaining)\n", |
---|
34 | seconds_remaining |
---|
35 | ); |
---|
36 | } |
---|
37 | |
---|
38 | rtems_task Init(rtems_task_argument argument) |
---|
39 | { |
---|
40 | rtems_status_code status; |
---|
41 | |
---|
42 | rtems_print_printer_printf(&rtems_test_printer); |
---|
43 | |
---|
44 | rtems_test_begin(); |
---|
45 | |
---|
46 | status = rtems_shell_wait_for_input( |
---|
47 | STDIN_FILENO, |
---|
48 | 10, |
---|
49 | notification, |
---|
50 | NULL |
---|
51 | ); |
---|
52 | if (status != RTEMS_SUCCESSFUL) { |
---|
53 | rtems_test_end(); |
---|
54 | exit( 0 ); |
---|
55 | } |
---|
56 | |
---|
57 | /* initialize network */ |
---|
58 | rtems_bsdnet_initialize_network(); |
---|
59 | rtems_pppd_initialize(); |
---|
60 | pppdapp_initialize(); |
---|
61 | rtems_task_delete(RTEMS_SELF); |
---|
62 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.