5
Last change
on this file since 0ec9bbc was
a397c7d8,
checked in by Sebastian Huber <sebastian.huber@…>, on 12/13/17 at 07:00:02
|
IMFS: Include <rtems/imfs.h>
Prepare for header file move to common include directory.
Update #3254.
|
-
Property mode set to
100644
|
File size:
932 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Mount an IMFS |
---|
5 | * @ingroup IMFS |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-1999. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * Modifications to support reference counting in the file system are |
---|
13 | * Copyright (c) 2012 embedded brains GmbH. |
---|
14 | * |
---|
15 | * The license and distribution terms for this file may be |
---|
16 | * found in the file LICENSE in this distribution or at |
---|
17 | * http://www.rtems.org/license/LICENSE. |
---|
18 | */ |
---|
19 | |
---|
20 | #if HAVE_CONFIG_H |
---|
21 | #include "config.h" |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <rtems/imfs.h> |
---|
25 | |
---|
26 | int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) |
---|
27 | { |
---|
28 | int rv = 0; |
---|
29 | IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; |
---|
30 | |
---|
31 | if ( IMFS_is_directory( node ) ) { |
---|
32 | IMFS_directory_t *dir = (IMFS_directory_t *) node; |
---|
33 | |
---|
34 | if ( dir->mt_fs == NULL ) { |
---|
35 | dir->mt_fs = mt_entry; |
---|
36 | } else { |
---|
37 | errno = EBUSY; |
---|
38 | rv = -1; |
---|
39 | } |
---|
40 | } else { |
---|
41 | errno = ENOTDIR; |
---|
42 | rv = -1; |
---|
43 | } |
---|
44 | |
---|
45 | return rv; |
---|
46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.