Subversion Repositories HelenOS

Rev

Rev 2763 | Rev 2934 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2763 Rev 2788
Line 41... Line 41...
41
char text[] = "O xein', angellein Lakedaimoniois hoti teide "
41
char text[] = "O xein', angellein Lakedaimoniois hoti teide "
42
    "keimetha tois keinon rhemasi peithomenoi.";
42
    "keimetha tois keinon rhemasi peithomenoi.";
43
 
43
 
44
char *test_vfs1(bool quiet)
44
char *test_vfs1(bool quiet)
45
{
45
{
-
 
46
    int rc;
-
 
47
 
46
    if (mount("tmpfs", "/", "nulldev0") != EOK)
48
    rc = mount("tmpfs", "/", "nulldev0");
47
        return "mount() failed.\n";
49
    switch (rc) {
-
 
50
    case EOK:
48
    if (!quiet)
51
        if (!quiet)
49
        printf("mounted tmpfs on /.\n");
52
            printf("mounted tmpfs on /\n");
-
 
53
        break;
-
 
54
    case EBUSY:
-
 
55
        if (!quiet)
-
 
56
            printf("(INFO) something is already mounted on /\n");
-
 
57
        break;
-
 
58
    default:
-
 
59
        if (!quiet)
-
 
60
            printf("(INFO) IPC returned errno %d\n", rc);
-
 
61
        return "mount() failed.";
-
 
62
    }
50
 
63
 
51
    if (mkdir("/mydir", 0) != 0)
64
    if (mkdir("/mydir", 0) != 0)
52
        return "mkdir() failed.\n";
65
        return "mkdir() failed.\n";
53
    if (!quiet)
66
    if (!quiet)
54
        printf("created directory /mydir\n");
67
        printf("created directory /mydir\n");