source: rtems/testsuites/libtests/tar02/init.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2010.
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.com/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <bsp.h> /* for device driver prototypes */
15#include "tmacros.h"
16#include <rtems/imfs.h>
17#include <rtems/error.h>
18
19#include <stdio.h>
20#include <stdlib.h>
21#include <sys/types.h>
22#include <sys/stat.h>
23#include <fcntl.h>
24#include <unistd.h>
25
26#include "initial_filesystem_tar.h"
27
28#define TARFILE_START initial_filesystem_tar
29#define TARFILE_SIZE  initial_filesystem_tar_size
30
31void test_cat(
32  char *file,
33  int   offset_arg,
34  int   length
35);
36
37void test_tarfs_load(void)
38{
39  rtems_status_code sc;
40
41  printf("Loading tarfs image ... ");
42  sc = rtems_tarfs_load("/",(void *)TARFILE_START, TARFILE_SIZE);
43  if (sc != RTEMS_SUCCESSFUL) {
44    printf ("error: untar failed: %s\n", rtems_status_text (sc));
45    exit(1);
46  }
47  printf ("successful\n");
48
49  /******************/
50  printf( "========= /home/test_file =========\n" );
51  test_cat( "/home/test_file", 0, 0 );
52 
53  /******************/
54  puts("*** Skipping symlink -- NOT CURRENTLY SUPPORTED ***" );
55#if 0
56  printf( "========= /symlink =========\n" );
57  test_cat( "/symlink", 0, 0 );
58#endif
59}
60
61rtems_task Init(
62  rtems_task_argument ignored
63)
64{
65  printf( "\n\n*** TAR02 TEST ***\n" );
66
67  test_tarfs_load();
68  IMFS_dump();
69
70  printf( "*** END OF TAR02 TEST ***\n" );
71  exit( 0 );
72}
73
74
75/* NOTICE: the clock driver is explicitly disabled */
76#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
77#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
78
79#define CONFIGURE_MAXIMUM_TASKS            1
80#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
81#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
82
83#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
84
85#define CONFIGURE_INIT
86#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.