Changeset 1356a04c in mainline
- Timestamp:
 - 2007-12-23T22:38:47Z (18 years ago)
 - Branches:
 - lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
 - Children:
 - ee1b8ca
 - Parents:
 - 7dab6b8
 - File:
 - 
      
- 1 edited
 
- 
          
  uspace/app/tester/vfs/vfs1.c (modified) (3 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
uspace/app/tester/vfs/vfs1.c
r7dab6b8 r1356a04c 46 46 int vfs_phone; 47 47 vfs_phone = ipc_connect_me_to(PHONE_NS, SERVICE_VFS, 0, 0); 48 if (vfs_phone < EOK) {48 if (vfs_phone < EOK) 49 49 return "Could not connect to VFS.\n"; 50 }51 50 52 51 /* 2. mount TMPFS as / */ … … 63 62 } 64 63 async_wait_for(req, &rc); 65 if (rc != EOK) {64 if (rc != EOK) 66 65 return "Mount failed.\n"; 67 }68 66 69 67 /* 3. open some files */ … … 76 74 } 77 75 async_wait_for(req, &rc); 78 if (rc != EOK) {76 if (rc != EOK) 79 77 return "Open failed.\n"; 78 if (!quiet) 79 printf("Opened %s handle=%d\n", path, IPC_GET_ARG1(answer)); 80 81 /* 4. read data */ 82 char buf[10]; 83 req = async_send_1(vfs_phone, VFS_READ, 0, &answer); 84 if (ipc_data_read_send(vfs_phone, buf, sizeof(buf)) != EOK) { 85 async_wait_for(req, &rc); 86 return "Could not read data from open file.\n"; 80 87 } 81 82 if ( !quiet) {83 printf("Opened %s handle=%d\n", path, IPC_GET_ARG1(answer));84 }88 async_wait_for(req, &rc); 89 if (rc != EOK) 90 return "Read failed.\n"; 91 printf("Read %d bytes: %s\n", IPC_GET_ARG1(answer), buf); 85 92 86 93 return NULL;  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  