source: rtems/cpukit/libcsupport/src/base_fs.c @ da154e14

4.115
Last change on this file since da154e14 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 *  Base file system initialization
3 *
4 *  COPYRIGHT (c) 1989-2008.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  Modifications to support reference counting in the file system are
8 *  Copyright (c) 2012 embedded brains GmbH.
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 */
14
15#if HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <rtems.h>
20#include <rtems/libio.h>
21#include <rtems/libio_.h>
22
23/*
24 *  Default mode for created files.
25 */
26
27
28/*
29 *  rtems_filesystem_initialize
30 *
31 *  Initialize the foundation of the file system.  This is specified
32 *  by the structure rtems_filesystem_mount_table.  The usual
33 *  configuration is a single instantiation of the IMFS or miniIMFS with
34 *  a single "/dev" directory in it.
35 */
36
37void rtems_filesystem_initialize( void )
38{
39  int rv = 0;
40  const rtems_filesystem_mount_configuration *root_config =
41    &rtems_filesystem_root_configuration;
42
43  rv = mount(
44    root_config->source,
45    root_config->target,
46    root_config->filesystemtype,
47    root_config->options,
48    root_config->data
49  );
50  if ( rv != 0 )
51    rtems_fatal_error_occurred( 0xABCD0002 );
52
53  /*
54   *  Traditionally RTEMS devices are under "/dev" so install this directory.
55   *
56   *  If the mkdir() fails, we can't print anything so just fatal error.
57   *
58   *  NOTE: UNIX root is 755 and owned by root/root (0/0).  It is actually
59   *        created that way by the IMFS.
60   */
61
62  rv = mkdir( "/dev", 0777);
63  if ( rv != 0 )
64    rtems_fatal_error_occurred( 0xABCD0003 );
65
66  /*
67   *  You can't mount another filesystem properly until the mount point
68   *  it will be mounted onto is created.  Moreover, if it is going to
69   *  use a device, then it is REALLY unfair to attempt this
70   *  before device drivers are initialized.  So we return via a base
71   *  filesystem image and nothing auto-mounted at this point.
72   */
73}
Note: See TracBrowser for help on using the repository browser.