1 | /* |
---|
2 | ------------------------------------------------------------------------ |
---|
3 | $Id$ |
---|
4 | ------------------------------------------------------------------------ |
---|
5 | |
---|
6 | Copyright Cybertec Pty Ltd, 2000 |
---|
7 | All rights reserved Cybertec Pty Ltd, 2000 |
---|
8 | |
---|
9 | COPYRIGHT (c) 1989-1998. |
---|
10 | On-Line Applications Research Corporation (OAR). |
---|
11 | Copyright assigned to U.S. Government, 1994. |
---|
12 | |
---|
13 | The license and distribution terms for this file may be |
---|
14 | found in the file LICENSE in this distribution or at |
---|
15 | |
---|
16 | http://www.OARcorp.com/rtems/license.html. |
---|
17 | |
---|
18 | This software with is provided ``as is'' and with NO WARRANTY. |
---|
19 | |
---|
20 | ------------------------------------------------------------------------ |
---|
21 | |
---|
22 | RTEMS Root FS creatation support. |
---|
23 | |
---|
24 | */ |
---|
25 | |
---|
26 | #ifndef __RTEMS_MKROOTFS_h |
---|
27 | #define __RTEMS_MKROOTFS_h |
---|
28 | |
---|
29 | #include <rtems.h> |
---|
30 | |
---|
31 | /* |
---|
32 | * Builds the complete path, like "mkdir -p". |
---|
33 | */ |
---|
34 | |
---|
35 | int |
---|
36 | rtems_rootfs_mkdir (const char *path, mode_t omode); |
---|
37 | |
---|
38 | /* |
---|
39 | * Appends the lines to the a file. Create the file |
---|
40 | * and builds the path if it does not exist. |
---|
41 | */ |
---|
42 | |
---|
43 | int |
---|
44 | rtems_rootfs_file_append (const char *file, |
---|
45 | mode_t omode, |
---|
46 | const int line_cnt, |
---|
47 | const char **lines); |
---|
48 | |
---|
49 | /* |
---|
50 | * Helper for bulding an /etc/hosts file. |
---|
51 | */ |
---|
52 | |
---|
53 | int |
---|
54 | rtems_rootfs_append_host_rec (unsigned long cip, |
---|
55 | const char *cname, |
---|
56 | const char *dname); |
---|
57 | |
---|
58 | /* |
---|
59 | * Create a few common directories, plus a : |
---|
60 | * /etc/passwd, /etc/group, /etc/host.conf, and |
---|
61 | * /etc/hosts file. |
---|
62 | */ |
---|
63 | |
---|
64 | int |
---|
65 | rtems_create_root_fs (); |
---|
66 | |
---|
67 | #endif |
---|