Changes in uspace/app/trace/trace.c [6afc9d7:9c4cf0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/trace.c
r6afc9d7 r9c4cf0d 512 512 goto error; 513 513 514 /* Send program pathname*/515 rc = loader_set_p athname(ldr, path);514 /* Send program. */ 515 rc = loader_set_program_path(ldr, path); 516 516 if (rc != EOK) 517 517 goto error; … … 523 523 524 524 /* Send default files */ 525 int *files[4];525 int fd_root; 526 526 int fd_stdin; 527 527 int fd_stdout; 528 528 int fd_stderr; 529 529 530 if ((stdin != NULL) && (vfs_fhandle(stdin, &fd_stdin) == EOK)) 531 files[0] = &fd_stdin; 532 else 533 files[0] = NULL; 534 535 if ((stdout != NULL) && (vfs_fhandle(stdout, &fd_stdout) == EOK)) 536 files[1] = &fd_stdout; 537 else 538 files[1] = NULL; 539 540 if ((stderr != NULL) && (vfs_fhandle(stderr, &fd_stderr) == EOK)) 541 files[2] = &fd_stderr; 542 else 543 files[2] = NULL; 544 545 files[3] = NULL; 546 547 rc = loader_set_files(ldr, files); 548 if (rc != EOK) 549 goto error; 550 530 fd_root = vfs_root(); 531 if (fd_root >= 0) { 532 rc = loader_add_inbox(ldr, "root", fd_root); 533 vfs_put(fd_root); 534 if (rc != EOK) 535 goto error; 536 } 537 538 if ((stdin != NULL) && (vfs_fhandle(stdin, &fd_stdin) == EOK)) { 539 rc = loader_add_inbox(ldr, "stdin", fd_stdin); 540 if (rc != EOK) 541 goto error; 542 } 543 544 if ((stdout != NULL) && (vfs_fhandle(stdout, &fd_stdout) == EOK)) { 545 rc = loader_add_inbox(ldr, "stdout", fd_stdout); 546 if (rc != EOK) 547 goto error; 548 } 549 550 if ((stderr != NULL) && (vfs_fhandle(stderr, &fd_stderr) == EOK)) { 551 rc = loader_add_inbox(ldr, "stderr", fd_stderr); 552 if (rc != EOK) 553 goto error; 554 } 555 551 556 /* Load the program. */ 552 557 rc = loader_load_program(ldr); … … 696 701 697 702 p = proto_new("vfs"); 698 o = oper_new("open", 2, arg_def, V_INT_ERRNO, 0, resp_def); 699 proto_add_oper(p, VFS_IN_OPEN, o); 700 o = oper_new("read", 1, arg_def, V_ERRNO, 1, resp_def); 703 o = oper_new("read", 3, arg_def, V_ERRNO, 1, resp_def); 701 704 proto_add_oper(p, VFS_IN_READ, o); 702 o = oper_new("write", 1, arg_def, V_ERRNO, 1, resp_def);705 o = oper_new("write", 3, arg_def, V_ERRNO, 1, resp_def); 703 706 proto_add_oper(p, VFS_IN_WRITE, o); 704 o = oper_new("seek", 3, arg_def, V_ERRNO, 0, resp_def); 705 proto_add_oper(p, VFS_IN_SEEK, o); 706 o = oper_new("truncate", 5, arg_def, V_ERRNO, 0, resp_def); 707 proto_add_oper(p, VFS_IN_TRUNCATE, o); 708 o = oper_new("fstat", 1, arg_def, V_ERRNO, 0, resp_def); 709 proto_add_oper(p, VFS_IN_FSTAT, o); 710 o = oper_new("close", 1, arg_def, V_ERRNO, 0, resp_def); 711 proto_add_oper(p, VFS_IN_CLOSE, o); 712 o = oper_new("mount", 2, arg_def, V_ERRNO, 0, resp_def); 707 o = oper_new("vfs_resize", 5, arg_def, V_ERRNO, 0, resp_def); 708 proto_add_oper(p, VFS_IN_RESIZE, o); 709 o = oper_new("vfs_stat", 1, arg_def, V_ERRNO, 0, resp_def); 710 proto_add_oper(p, VFS_IN_STAT, o); 711 o = oper_new("vfs_put", 1, arg_def, V_ERRNO, 0, resp_def); 712 proto_add_oper(p, VFS_IN_PUT, o); 713 o = oper_new("vfs_mount", 2, arg_def, V_ERRNO, 0, resp_def); 713 714 proto_add_oper(p, VFS_IN_MOUNT, o); 714 715 /* o = oper_new("unmount", 0, arg_def); 715 716 proto_add_oper(p, VFS_IN_UNMOUNT, o);*/ 716 o = oper_new(" sync", 1, arg_def, V_ERRNO, 0, resp_def);717 o = oper_new("vfs_sync", 1, arg_def, V_ERRNO, 0, resp_def); 717 718 proto_add_oper(p, VFS_IN_SYNC, o); 718 o = oper_new("mkdir", 1, arg_def, V_ERRNO, 0, resp_def);719 proto_add_oper(p, VFS_IN_MKDIR, o);720 o = oper_new("unlink", 0, arg_def, V_ERRNO, 0, resp_def);721 proto_add_oper(p, VFS_IN_UNLINK, o);722 719 o = oper_new("rename", 0, arg_def, V_ERRNO, 0, resp_def); 723 720 proto_add_oper(p, VFS_IN_RENAME, o); 724 o = oper_new("stat", 0, arg_def, V_ERRNO, 0, resp_def); 725 proto_add_oper(p, VFS_IN_STAT, o); 726 o = oper_new("statfs", 0, arg_def, V_ERRNO, 0, resp_def); 721 o = oper_new("vfs_statfs", 0, arg_def, V_ERRNO, 0, resp_def); 727 722 proto_add_oper(p, VFS_IN_STATFS, o); 723 o = oper_new("vfs_walk", 2, arg_def, V_INT_ERRNO, 0, resp_def); 724 proto_add_oper(p, VFS_IN_WALK, o); 725 o = oper_new("vfs_open", 2, arg_def, V_ERRNO, 0, resp_def); 726 proto_add_oper(p, VFS_IN_OPEN, o); 727 o = oper_new("vfs_unlink", 3, arg_def, V_ERRNO, 0, resp_def); 728 proto_add_oper(p, VFS_IN_UNLINK, o); 728 729 729 730 proto_register(SERVICE_VFS, p);
Note:
See TracChangeset
for help on using the changeset viewer.