Changeset 2b0db98 in mainline for uspace/app/tester/vfs/vfs1.c


Ignore:
Timestamp:
2011-01-07T14:02:56Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6986418
Parents:
d99120f (diff), 0f191a2 (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:

Merged development into lelian/hidd

File:
1 edited

Legend:

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

    rd99120f r2b0db98  
    4040#include "../tester.h"
    4141
    42 #define FS_TYPE      "tmpfs"
    43 #define MOUNT_POINT  "/tmp"
    44 #define OPTIONS      ""
    45 #define FLAGS        0
    46 
    47 #define TEST_DIRECTORY  MOUNT_POINT "/testdir"
     42#define TEST_DIRECTORY  "/tmp/testdir"
    4843#define TEST_FILE       TEST_DIRECTORY "/testfile"
    4944#define TEST_FILE2      TEST_DIRECTORY "/nextfile"
     
    7570const char *test_vfs1(void)
    7671{
    77         if (mkdir(MOUNT_POINT, 0) != 0)
     72        int rc;
     73        if ((rc = mkdir(TEST_DIRECTORY, 0)) != 0) {
     74                TPRINTF("rc=%d\n", rc);
    7875                return "mkdir() failed";
    79         TPRINTF("Created directory %s\n", MOUNT_POINT);
    80        
    81         int rc = mount(FS_TYPE, MOUNT_POINT, "", OPTIONS, FLAGS);
    82         switch (rc) {
    83         case EOK:
    84                 TPRINTF("Mounted %s on %s\n", FS_TYPE, MOUNT_POINT);
    85                 break;
    86         case EBUSY:
    87                 TPRINTF("(INFO) Filesystem already mounted on %s\n", MOUNT_POINT);
    88                 break;
    89         default:
    90                 TPRINTF("(ERR) IPC returned errno %d (is tmpfs loaded?)\n", rc);
    91                 return "mount() failed";
    9276        }
    93        
    94         if (mkdir(TEST_DIRECTORY, 0) != 0)
    95                 return "mkdir() failed";
    9677        TPRINTF("Created directory %s\n", TEST_DIRECTORY);
    9778       
Note: See TracChangeset for help on using the changeset viewer.