4.115
Last change
on this file since c499856 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
940 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup LibIO |
---|
5 | * |
---|
6 | * @brief mount_and_make_target_path() implementation. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2010 |
---|
11 | * embedded brains GmbH |
---|
12 | * Obere Lagerstr. 30 |
---|
13 | * D-82178 Puchheim |
---|
14 | * Germany |
---|
15 | * <rtems@embedded-brains.de> |
---|
16 | * |
---|
17 | * The license and distribution terms for this file may be |
---|
18 | * found in the file LICENSE in this distribution or at |
---|
19 | * http://www.rtems.org/license/LICENSE. |
---|
20 | */ |
---|
21 | |
---|
22 | #if HAVE_CONFIG_H |
---|
23 | #include "config.h" |
---|
24 | #endif |
---|
25 | |
---|
26 | #include <errno.h> |
---|
27 | |
---|
28 | #include <rtems/libio.h> |
---|
29 | |
---|
30 | int mount_and_make_target_path( |
---|
31 | const char *source, |
---|
32 | const char *target, |
---|
33 | const char *filesystemtype, |
---|
34 | rtems_filesystem_options_t options, |
---|
35 | const void *data |
---|
36 | ) |
---|
37 | { |
---|
38 | int rv = -1; |
---|
39 | |
---|
40 | if (target != NULL) { |
---|
41 | rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); |
---|
42 | if (rv == 0) { |
---|
43 | rv = mount( |
---|
44 | source, |
---|
45 | target, |
---|
46 | filesystemtype, |
---|
47 | options, |
---|
48 | data |
---|
49 | ); |
---|
50 | } |
---|
51 | } else { |
---|
52 | errno = EINVAL; |
---|
53 | } |
---|
54 | |
---|
55 | return rv; |
---|
56 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.