source: rtems/testsuites/fstests/mrfs_support/fs_support.c @ db6fbdf

4.115
Last change on this file since db6fbdf was db6fbdf, checked in by Ralf Corsepius <ralf.corsepius@…>, on 09/07/11 at 07:32:05

2011-09-07 Ralf Corsépius <ralf.corsepius@…>

  • fserror/fserror.doc, fserror/test.c, fslink/fslink.doc, fslink/test.c, fspatheval/patheval.doc, fspatheval/test.c, fspermission/fspermission.doc, fspermission/test.c, fsrdwr/fsrdwr.doc, fsrdwr/init.c, fssymlink/fssymlink.doc, fssymlink/test.c, fstime/fstime.doc, fstime/test.c, imfs_support/fs_config.h, imfs_support/fs_support.c, imfs_support/fs_supprot.h, mdosfs_support/fs_config.h, mdosfs_support/fs_support.c, mimfs_support/fs_config.h, mimfs_support/fs_support.c, mrfs_support/fs_config.h, mrfs_support/fs_support.c, support/fstest.h, support/fstest_support.c, support/fstest_support.h, support/ramdisk_support.c, support/ramdisk_support.h: Fix CVS-Ids.
  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
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 *  $Id$
10 */
11
12#ifdef HAVE_CONFIG_H
13#include "config.h"
14#endif
15#include "pmacros.h"
16
17#include <sys/stat.h>
18#include <sys/types.h>
19
20#include <rtems/libio.h>
21#include <rtems/rtems-rfs-format.h>
22
23#include "ramdisk_support.h"
24
25#include "fstest.h"
26
27#define BLOCK_SIZE (512)
28
29rtems_rfs_format_config config = {
30block_size:BLOCK_SIZE
31};
32
33
34void
35test_initialize_filesystem (void)
36{
37  int rc = 0;
38  rc = mkdir (BASE_FOR_TEST,S_IRWXU|S_IRWXG|S_IRWXO);
39  rtems_test_assert (rc == 0);
40
41  init_ramdisk ();
42
43  rc = rtems_rfs_format (RAMDISK_PATH, &config);
44  rtems_test_assert (rc == 0);
45
46  rc = mount (RAMDISK_PATH,
47              BASE_FOR_TEST, "rfs", RTEMS_FILESYSTEM_READ_WRITE, NULL);
48  rtems_test_assert (rc == 0);
49}
50
51
52void
53test_shutdown_filesystem (void)
54{
55  int rc = 0;
56  rc = unmount (BASE_FOR_TEST);
57  rtems_test_assert (rc == 0);
58  del_ramdisk ();
59}
60
61/* configuration information */
62#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
63#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
64
65#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
66
67#define CONFIGURE_MAXIMUM_TASKS                     10
68#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
69#define CONFIGURE_MAXIMUM_DRIVERS                   10
70#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS    40
71
72#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
73
74#define CONFIGURE_FILESYSTEM_RFS
75
76#define CONFIGURE_INIT
77#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.