blob: b5805b252463e12ce51f9fed40fc0c3731687682 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#include <pkgconf/system.h>
#include <pkgconf/isoinfra.h>
#include <cyg/infra/diag.h>
#include <cyg/io/file.h>
#if 0
externC int chdir(const char *);
/* ================================================================= */
/* Initialization object
*/
class NetTestInit
{
public:
NetTestInit();
};
/* ----------------------------------------------------------------- */
/* Static initialization object instance. The constructor is
* prioritized to run after any filesystem constructors.
*/
static NetTestInit netTestInitializer CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO_FS + 1);
/* ----------------------------------------------------------------- */
/* Constructor, mounts the file system
*/
NetTestInit::NetTestInit()
{
int err = 0;
err = mount( "/dev/flash1", "/jffs2", "jffs2" );
if(err < 0)
{
diag_printf("unable to mount jffs\n");
}
else
{
diag_printf("mounted jffs\n");
}
err = mount( "", "/ramfs", "ramfs" );
if(err < 0)
{
diag_printf("unable to mount ramfs\n");
}
else
{
diag_printf("mounted ramfs\n");
}
chdir( "/ramfs" );
}
#endif
|