source: rtems/testsuites/samples/pppd/init.c @ af43554

5
Last change on this file since af43554 was af43554, checked in by Sebastian Huber <sebastian.huber@…>, on 10/26/17 at 11:59:11

tests: Remove TEST_INIT

The TEST_EXTERN is a used only by the system.h style tests and they use
CONFIGURE_INIT appropriately.

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#include <stdio.h>
15#include <stdlib.h>
16#include <string.h>
17
18#define CONFIGURE_INIT
19#include "system.h"
20
21#include <rtems/rtems_bsdnet.h>
22#include <rtems/rtemspppd.h>
23#include <rtems/shell.h>
24#include "netconfig.h"
25
26const char rtems_test_name[] = "PPPD";
27
28static void notification(int fd, int seconds_remaining, void *arg)
29{
30  printf(
31    "Press any key to start pppd (%is remaining)\n",
32    seconds_remaining
33  );
34}
35
36rtems_task Init(rtems_task_argument argument)
37{
38  rtems_status_code status;
39
40  rtems_print_printer_fprintf_putc(&rtems_test_printer);
41
42  rtems_test_begin();
43
44  status = rtems_shell_wait_for_input(
45    STDIN_FILENO,
46    10,
47    notification,
48    NULL
49  );
50  if (status != RTEMS_SUCCESSFUL) {
51    rtems_test_end();
52    exit( 0 );
53  }
54
55  /* initialize network */
56  rtems_bsdnet_initialize_network();
57  rtems_pppd_initialize();
58  pppdapp_initialize();
59  rtems_task_delete(RTEMS_SELF);
60}
Note: See TracBrowser for help on using the repository browser.