Changes in uspace/app/trace/trace.c [79ae36dd:7c014d1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/trace.c
r79ae36dd r7c014d1 50 50 #include <sys/types.h> 51 51 #include <sys/typefmt.h> 52 #include <vfs/vfs.h> 52 53 53 54 #include <libc.h> … … 85 86 void thread_trace_start(uintptr_t thread_hash); 86 87 87 static proto_t *proto_console;88 88 static task_id_t task_id; 89 89 static loader_t *task_ldr; … … 586 586 587 587 /* Send default files */ 588 fdi_node_t *files[4];589 fdi_node_t stdin_node;590 fdi_node_t stdout_node;591 fdi_node_t stderr_node;592 593 if ((stdin != NULL) && (f node(stdin, &stdin_node) == EOK))594 files[0] = & stdin_node;588 int *files[4]; 589 int fd_stdin; 590 int fd_stdout; 591 int fd_stderr; 592 593 if ((stdin != NULL) && (fhandle(stdin, &fd_stdin) == EOK)) 594 files[0] = &fd_stdin; 595 595 else 596 596 files[0] = NULL; 597 597 598 if ((stdout != NULL) && (f node(stdout, &stdout_node) == EOK))599 files[1] = & stdout_node;598 if ((stdout != NULL) && (fhandle(stdout, &fd_stdout) == EOK)) 599 files[1] = &fd_stdout; 600 600 else 601 601 files[1] = NULL; 602 602 603 if ((stderr != NULL) && (f node(stderr, &stderr_node) == EOK))604 files[2] = & stderr_node;603 if ((stderr != NULL) && (fhandle(stderr, &fd_stderr) == EOK)) 604 files[2] = &fd_stderr; 605 605 else 606 606 files[2] = NULL; … … 658 658 ipcp_init(); 659 659 660 /*661 * User apps now typically have console on phone 3.662 * (Phones 1 and 2 are used by the loader).663 */664 ipcp_connection_set(3, 0, proto_console);665 666 660 rc = get_thread_list(); 667 661 if (rc < 0) { … … 713 707 fibril_mutex_unlock(&state_lock); 714 708 printf("Resume...\n"); 709 break; 710 default: 715 711 break; 716 712 } … … 761 757 o = oper_new("open", 2, arg_def, V_INT_ERRNO, 0, resp_def); 762 758 proto_add_oper(p, VFS_IN_OPEN, o); 763 o = oper_new("open_node", 4, arg_def, V_INT_ERRNO, 0, resp_def);764 proto_add_oper(p, VFS_IN_OPEN_NODE, o);765 759 o = oper_new("read", 1, arg_def, V_ERRNO, 1, resp_def); 766 760 proto_add_oper(p, VFS_IN_READ, o); … … 791 785 792 786 proto_register(SERVICE_VFS, p); 793 794 p = proto_new("console");795 796 o = oper_new("write", 1, arg_def, V_ERRNO, 1, resp_def);797 proto_add_oper(p, VFS_IN_WRITE, o);798 799 resp_def[0] = V_INTEGER; resp_def[1] = V_INTEGER;800 resp_def[2] = V_INTEGER; resp_def[3] = V_CHAR;801 o = oper_new("getkey", 0, arg_def, V_ERRNO, 4, resp_def);802 803 arg_def[0] = V_CHAR;804 o = oper_new("clear", 0, arg_def, V_VOID, 0, resp_def);805 proto_add_oper(p, CONSOLE_CLEAR, o);806 807 arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER;808 o = oper_new("goto", 2, arg_def, V_VOID, 0, resp_def);809 proto_add_oper(p, CONSOLE_GOTO, o);810 811 resp_def[0] = V_INTEGER; resp_def[1] = V_INTEGER;812 o = oper_new("getsize", 0, arg_def, V_INTEGER, 2, resp_def);813 proto_add_oper(p, CONSOLE_GET_SIZE, o);814 815 arg_def[0] = V_INTEGER;816 o = oper_new("set_style", 1, arg_def, V_VOID, 0, resp_def);817 proto_add_oper(p, CONSOLE_SET_STYLE, o);818 arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER; arg_def[2] = V_INTEGER;819 o = oper_new("set_color", 3, arg_def, V_VOID, 0, resp_def);820 proto_add_oper(p, CONSOLE_SET_COLOR, o);821 arg_def[0] = V_INTEGER; arg_def[1] = V_INTEGER;822 o = oper_new("set_rgb_color", 2, arg_def, V_VOID, 0, resp_def);823 proto_add_oper(p, CONSOLE_SET_RGB_COLOR, o);824 o = oper_new("cursor_visibility", 1, arg_def, V_VOID, 0, resp_def);825 proto_add_oper(p, CONSOLE_CURSOR_VISIBILITY, o);826 827 proto_console = p;828 proto_register(SERVICE_CONSOLE, p);829 787 } 830 788
Note:
See TracChangeset
for help on using the changeset viewer.