Changeset 5973fd0 in mainline for uspace/app/tester/vfs/vfs1.c
- Timestamp:
- 2008-01-18T23:45:16Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ae78b53
- Parents:
- 62da45a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/vfs/vfs1.c
r62da45a r5973fd0 1 1 /* 2 * Copyright (c) 200 7Jakub Jermar2 * Copyright (c) 2008 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 35 35 #include <unistd.h> 36 36 #include <fcntl.h> 37 #include <dirent.h> 37 38 #include "../tester.h" 38 39 … … 41 42 if (mount("tmpfs", "/", "nulldev0") != EOK) 42 43 return "Mount failed.\n"; 44 45 46 DIR *dirp; 47 struct dirent *dp; 48 49 dirp = opendir("/"); 50 if (!dirp) 51 return "opendir() failed."; 52 while ((dp = readdir(dirp))) 53 printf("Discovered %s\n", dp->d_name); 54 closedir(dirp); 55 43 56 int fd1 = open("/dir1/file1", 0); 44 57 int fd2 = open("/dir2/file2", 0); 45 58 46 59 if (fd1 < 0) 47 return " Openfailed.\n";60 return "open() failed.\n"; 48 61 if (fd2 < 0) 49 return " Openfailed.\n";62 return "open() failed.\n"; 50 63 51 64 if (!quiet) … … 56 69 ssize_t cnt = read(fd1, buf, sizeof(buf)); 57 70 if (cnt < 0) 58 return " Readfailed.\n";71 return "read() failed.\n"; 59 72 60 73 if (!quiet)
Note:
See TracChangeset
for help on using the changeset viewer.