Changeset 371bd7d in mainline for uspace/app/tester/vfs/vfs1.c


Ignore:
Timestamp:
2010-03-27T09:22:17Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36a75a2
Parents:
cd82bb1 (diff), eaf22d4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/vfs/vfs1.c

    rcd82bb1 r371bd7d  
    3030#include <stdio.h>
    3131#include <stdlib.h>
    32 #include <string.h>
     32#include <str.h>
    3333#include <vfs/vfs.h>
    3434#include <unistd.h>
     
    5454static char text[] = "Lorem ipsum dolor sit amet, consectetur adipisicing elit";
    5555
    56 static char *read_root(void)
     56static const char *read_root(void)
    5757{
    5858        TPRINTF("Opening the root directory...");
     
    7373}
    7474
    75 char *test_vfs1(void)
     75const char *test_vfs1(void)
    7676{
    7777        if (mkdir(MOUNT_POINT, 0) != 0)
     
    7979        TPRINTF("Created directory %s\n", MOUNT_POINT);
    8080       
    81         char null[MAX_DEVICE_NAME];
    82         int null_id = devmap_null_create();
    83        
    84         if (null_id == -1)
    85                 return "Unable to create null device";
    86        
    87         snprintf(null, MAX_DEVICE_NAME, "null%d", null_id);
    88         int rc = mount(FS_TYPE, MOUNT_POINT, null, OPTIONS, FLAGS);
     81        int rc = mount(FS_TYPE, MOUNT_POINT, "", OPTIONS, FLAGS);
    8982        switch (rc) {
    9083        case EOK:
    91                 TPRINTF("Mounted /dev/%s as %s on %s\n", null, FS_TYPE, MOUNT_POINT);
     84                TPRINTF("Mounted %s on %s\n", FS_TYPE, MOUNT_POINT);
    9285                break;
    9386        case EBUSY:
     
    128121        close(fd0);
    129122       
    130         char *rv = read_root();
     123        const char *rv = read_root();
    131124        if (rv != NULL)
    132125                return rv;
Note: See TracChangeset for help on using the changeset viewer.