Subversion Repositories HelenOS

Rev

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

Rev 2656 Rev 2657
Line 35... Line 35...
35
#include "../../../srv/vfs/vfs.h" 
35
#include "../../../srv/vfs/vfs.h" 
36
#include "../tester.h"
36
#include "../tester.h"
37
 
37
 
38
#define TMPFS_DEVHANDLE 999
38
#define TMPFS_DEVHANDLE 999
39
 
39
 
40
char buf[FS_NAME_MAXLEN + 1] = "tmpfs";
40
char fs_name[] = "tmpfs";
-
 
41
char mp[] = "/";
41
 
42
 
42
char *test_vfs1(bool quiet)
43
char *test_vfs1(bool quiet)
43
{
44
{
44
    /* 1. connect to VFS */
45
    /* 1. connect to VFS */
45
    int vfs_phone;
46
    int vfs_phone;
Line 50... Line 51...
50
   
51
   
51
    /* 2. mount TMPFS as / */
52
    /* 2. mount TMPFS as / */
52
    ipcarg_t rc;
53
    ipcarg_t rc;
53
    aid_t req;
54
    aid_t req;
54
    req = async_send_1(vfs_phone, VFS_MOUNT, TMPFS_DEVHANDLE, NULL);
55
    req = async_send_1(vfs_phone, VFS_MOUNT, TMPFS_DEVHANDLE, NULL);
55
    buf[sizeof(buf) - 1] = '/';
-
 
56
    if (ipc_data_send(vfs_phone, buf, sizeof(buf)) != EOK) {
56
    if (ipc_data_send(vfs_phone, fs_name, strlen(fs_name)) != EOK) {
57
        async_wait_for(req, &rc);
57
        async_wait_for(req, &rc);
-
 
58
        return "Could not send fs_name to VFS.\n";
-
 
59
    }
-
 
60
    if (ipc_data_send(vfs_phone, mp, strlen(mp)) != EOK) {
-
 
61
        async_wait_for(req, &rc);
58
        return "Could not send data to VFS.\n";
62
        return "Could not send mp to VFS.\n";
59
    }
63
    }
60
    async_wait_for(req, &rc);
64
    async_wait_for(req, &rc);
61
    if (rc != EOK) {
65
    if (rc != EOK) {
62
        return "Mount failed.\n";
66
        return "Mount failed.\n";
63
    }
67
    }