Changes in uspace/app/tester/vfs/vfs1.c [210e50a:0b0f4bb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/vfs/vfs1.c
r210e50a r0b0f4bb 30 30 #include <stdio.h> 31 31 #include <stdlib.h> 32 #include <str ing.h>32 #include <str.h> 33 33 #include <vfs/vfs.h> 34 34 #include <unistd.h> … … 54 54 static char text[] = "Lorem ipsum dolor sit amet, consectetur adipisicing elit"; 55 55 56 static c har *read_root(void)56 static const char *read_root(void) 57 57 { 58 58 TPRINTF("Opening the root directory..."); … … 73 73 } 74 74 75 c har *test_vfs1(void)75 const char *test_vfs1(void) 76 76 { 77 77 if (mkdir(MOUNT_POINT, 0) != 0) … … 105 105 if (cnt < 0) 106 106 return "write() failed"; 107 TPRINTF("Written % d bytes\n", cnt);107 TPRINTF("Written %zd bytes\n", cnt); 108 108 109 109 if (lseek(fd0, 0, SEEK_SET) != 0) … … 116 116 return "read() failed"; 117 117 118 TPRINTF("Read %d bytes: \".*s\"\n", cnt, cnt, buf); 118 int _cnt = (int) cnt; 119 if (_cnt != cnt) { 120 /* Count overflow, just to be sure. */ 121 TPRINTF("Read %zd bytes\n", cnt); 122 } else { 123 TPRINTF("Read %zd bytes: \"%.*s\"\n", cnt, _cnt, buf); 124 } 119 125 } 120 126 121 127 close(fd0); 122 128 123 c har *rv = read_root();129 const char *rv = read_root(); 124 130 if (rv != NULL) 125 131 return rv;
Note:
See TracChangeset
for help on using the changeset viewer.