Changes in uspace/lib/libc/generic/vfs/vfs.c [3734106:a405563] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/vfs/vfs.c
r3734106 ra405563 122 122 int res; 123 123 ipcarg_t rc; 124 ipcarg_t rc_orig;125 124 aid_t req; 126 125 dev_handle_t dev_handle; … … 142 141 rc = ipc_data_write_start(vfs_phone, (void *) mpa, mpa_size); 143 142 if (rc != EOK) { 144 async_wait_for(req, &rc_orig);143 async_wait_for(req, NULL); 145 144 async_serialize_end(); 146 145 futex_up(&vfs_phone_futex); 147 146 free(mpa); 148 if (rc_orig == EOK) 149 return (int) rc; 150 else 151 return (int) rc_orig; 147 return (int) rc; 152 148 } 153 149 154 150 rc = ipc_data_write_start(vfs_phone, (void *) opts, str_size(opts)); 155 151 if (rc != EOK) { 156 async_wait_for(req, &rc_orig);152 async_wait_for(req, NULL); 157 153 async_serialize_end(); 158 154 futex_up(&vfs_phone_futex); 159 155 free(mpa); 160 if (rc_orig == EOK) 161 return (int) rc; 162 else 163 return (int) rc_orig; 156 return (int) rc; 164 157 } 165 158 166 159 rc = ipc_data_write_start(vfs_phone, (void *) fs_name, str_size(fs_name)); 167 160 if (rc != EOK) { 168 async_wait_for(req, &rc_orig);161 async_wait_for(req, NULL); 169 162 async_serialize_end(); 170 163 futex_up(&vfs_phone_futex); 171 164 free(mpa); 172 if (rc_orig == EOK) 173 return (int) rc; 174 else 175 return (int) rc_orig; 165 return (int) rc; 176 166 } 177 167 … … 179 169 rc = async_req_0_0(vfs_phone, IPC_M_PING); 180 170 if (rc != EOK) { 181 async_wait_for(req, &rc_orig);171 async_wait_for(req, NULL); 182 172 async_serialize_end(); 183 173 futex_up(&vfs_phone_futex); 184 174 free(mpa); 185 if (rc_orig == EOK) 186 return (int) rc; 187 else 188 return (int) rc_orig; 175 return (int) rc; 189 176 } 190 177 … … 215 202 rc = ipc_data_write_start(vfs_phone, pa, pa_size); 216 203 if (rc != EOK) { 217 ipcarg_t rc_orig; 218 219 async_wait_for(req, &rc_orig); 204 async_wait_for(req, NULL); 220 205 async_serialize_end(); 221 206 futex_up(&vfs_phone_futex); 222 207 free(pa); 223 if (rc_orig == EOK) 224 return (int) rc; 225 else 226 return (int) rc_orig; 208 return (int) rc; 227 209 } 228 210 async_wait_for(req, &rc); … … 258 240 259 241 if (rc != EOK) 260 242 return (int) rc; 261 243 262 244 return (int) IPC_GET_ARG1(answer); … … 292 274 rc = ipc_data_read_start(vfs_phone, (void *)buf, nbyte); 293 275 if (rc != EOK) { 294 ipcarg_t rc_orig; 295 296 async_wait_for(req, &rc_orig); 297 async_serialize_end(); 298 futex_up(&vfs_phone_futex); 299 if (rc_orig == EOK) 300 return (ssize_t) rc; 301 else 302 return (ssize_t) rc_orig; 276 async_wait_for(req, NULL); 277 async_serialize_end(); 278 futex_up(&vfs_phone_futex); 279 return (ssize_t) rc; 303 280 } 304 281 async_wait_for(req, &rc); … … 324 301 rc = ipc_data_write_start(vfs_phone, (void *)buf, nbyte); 325 302 if (rc != EOK) { 326 ipcarg_t rc_orig; 327 328 async_wait_for(req, &rc_orig); 329 async_serialize_end(); 330 futex_up(&vfs_phone_futex); 331 if (rc_orig == EOK) 332 return (ssize_t) rc; 333 else 334 return (ssize_t) rc_orig; 303 async_wait_for(req, NULL); 304 async_serialize_end(); 305 futex_up(&vfs_phone_futex); 306 return (ssize_t) rc; 335 307 } 336 308 async_wait_for(req, &rc); … … 404 376 rc = ipc_data_read_start(vfs_phone, (void *)stat, sizeof(struct stat)); 405 377 if (rc != EOK) { 406 ipcarg_t rc_orig; 407 408 async_wait_for(req, &rc_orig); 409 async_serialize_end(); 410 futex_up(&vfs_phone_futex); 411 if (rc_orig == EOK) 412 return (ssize_t) rc; 413 else 414 return (ssize_t) rc_orig; 378 async_wait_for(req, NULL); 379 async_serialize_end(); 380 futex_up(&vfs_phone_futex); 381 return (ssize_t) rc; 415 382 } 416 383 async_wait_for(req, &rc); … … 424 391 { 425 392 ipcarg_t rc; 426 ipcarg_t rc_orig;427 393 aid_t req; 428 394 … … 439 405 rc = ipc_data_write_start(vfs_phone, pa, pa_size); 440 406 if (rc != EOK) { 441 async_wait_for(req, &rc_orig);407 async_wait_for(req, NULL); 442 408 async_serialize_end(); 443 409 futex_up(&vfs_phone_futex); 444 410 free(pa); 445 if (rc_orig == EOK) 446 return (int) rc; 447 else 448 return (int) rc_orig; 411 return (int) rc; 449 412 } 450 413 rc = ipc_data_read_start(vfs_phone, stat, sizeof(struct stat)); 451 414 if (rc != EOK) { 452 async_wait_for(req, &rc_orig);415 async_wait_for(req, NULL); 453 416 async_serialize_end(); 454 417 futex_up(&vfs_phone_futex); 455 418 free(pa); 456 if (rc_orig == EOK) 457 return (int) rc; 458 else 459 return (int) rc_orig; 419 return (int) rc; 460 420 } 461 421 async_wait_for(req, &rc); … … 516 476 rc = ipc_data_write_start(vfs_phone, pa, pa_size); 517 477 if (rc != EOK) { 518 ipcarg_t rc_orig; 519 520 async_wait_for(req, &rc_orig); 478 async_wait_for(req, NULL); 521 479 async_serialize_end(); 522 480 futex_up(&vfs_phone_futex); 523 481 free(pa); 524 if (rc_orig == EOK) 525 return (int) rc; 526 else 527 return (int) rc_orig; 482 return (int) rc; 528 483 } 529 484 async_wait_for(req, &rc); … … 551 506 rc = ipc_data_write_start(vfs_phone, pa, pa_size); 552 507 if (rc != EOK) { 553 ipcarg_t rc_orig; 554 555 async_wait_for(req, &rc_orig); 508 async_wait_for(req, NULL); 556 509 async_serialize_end(); 557 510 futex_up(&vfs_phone_futex); 558 511 free(pa); 559 if (rc_orig == EOK) 560 return (int) rc; 561 else 562 return (int) rc_orig; 512 return (int) rc; 563 513 } 564 514 async_wait_for(req, &rc); … … 582 532 { 583 533 ipcarg_t rc; 584 ipcarg_t rc_orig;585 534 aid_t req; 586 535 … … 604 553 rc = ipc_data_write_start(vfs_phone, olda, olda_size); 605 554 if (rc != EOK) { 606 async_wait_for(req, &rc_orig);555 async_wait_for(req, NULL); 607 556 async_serialize_end(); 608 557 futex_up(&vfs_phone_futex); 609 558 free(olda); 610 559 free(newa); 611 if (rc_orig == EOK) 612 return (int) rc; 613 else 614 return (int) rc_orig; 560 return (int) rc; 615 561 } 616 562 rc = ipc_data_write_start(vfs_phone, newa, newa_size); 617 563 if (rc != EOK) { 618 async_wait_for(req, &rc_orig);564 async_wait_for(req, NULL); 619 565 async_serialize_end(); 620 566 futex_up(&vfs_phone_futex); 621 567 free(olda); 622 568 free(newa); 623 if (rc_orig == EOK) 624 return (int) rc; 625 else 626 return (int) rc_orig; 569 return (int) rc; 627 570 } 628 571 async_wait_for(req, &rc);
Note:
See TracChangeset
for help on using the changeset viewer.