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