Changeset 984a9ba in mainline for uspace/srv/logger
- Timestamp:
- 2018-07-05T09:34:09Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- Location:
- uspace/srv/logger
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/logger/ctl.c
r76f566d r984a9ba 63 63 } 64 64 65 void logger_connection_handler_control( cap_call_handle_t chandle)65 void logger_connection_handler_control(ipc_call_t *icall) 66 66 { 67 67 errno_t rc; 68 68 int fd; 69 69 70 async_answer_0( chandle, EOK);70 async_answer_0(icall, EOK); 71 71 logger_log("control: new client.\n"); 72 72 73 73 while (true) { 74 74 ipc_call_t call; 75 cap_call_handle_t chandle =async_get_call(&call);75 async_get_call(&call); 76 76 77 77 if (!IPC_GET_IMETHOD(call)) … … 81 81 case LOGGER_CONTROL_SET_DEFAULT_LEVEL: 82 82 rc = set_default_logging_level(IPC_GET_ARG1(call)); 83 async_answer_0( chandle, rc);83 async_answer_0(&call, rc); 84 84 break; 85 85 case LOGGER_CONTROL_SET_LOG_LEVEL: 86 86 rc = handle_log_level_change(IPC_GET_ARG1(call)); 87 async_answer_0( chandle, rc);87 async_answer_0(&call, rc); 88 88 break; 89 89 case LOGGER_CONTROL_SET_ROOT: … … 93 93 vfs_put(fd); 94 94 } 95 async_answer_0( chandle, rc);95 async_answer_0(&call, rc); 96 96 break; 97 97 default: 98 async_answer_0( chandle, EINVAL);98 async_answer_0(&call, EINVAL); 99 99 break; 100 100 } -
uspace/srv/logger/logger.h
r76f566d r984a9ba 98 98 99 99 100 void logger_connection_handler_control( cap_call_handle_t);101 void logger_connection_handler_writer( cap_call_handle_t);100 void logger_connection_handler_control(ipc_call_t *); 101 void logger_connection_handler_writer(ipc_call_t *); 102 102 103 103 void parse_initial_settings(void); -
uspace/srv/logger/main.c
r76f566d r984a9ba 48 48 #include "logger.h" 49 49 50 static void connection_handler_control(cap_call_handle_t icall_handle, ipc_call_t *icall, 51 void *arg) 50 static void connection_handler_control(ipc_call_t *icall, void *arg) 52 51 { 53 logger_connection_handler_control(icall _handle);52 logger_connection_handler_control(icall); 54 53 } 55 54 56 static void connection_handler_writer(cap_call_handle_t icall_handle, ipc_call_t *icall, 57 void *arg) 55 static void connection_handler_writer(ipc_call_t *icall, void *arg) 58 56 { 59 logger_connection_handler_writer(icall _handle);57 logger_connection_handler_writer(icall); 60 58 } 61 59 -
uspace/srv/logger/writer.c
r76f566d r984a9ba 94 94 } 95 95 96 void logger_connection_handler_writer( cap_call_handle_t chandle)96 void logger_connection_handler_writer(ipc_call_t *icall) 97 97 { 98 98 logger_log_t *log; … … 100 100 101 101 /* Acknowledge the connection. */ 102 async_answer_0( chandle, EOK);102 async_answer_0(icall, EOK); 103 103 104 104 logger_log("writer: new client.\n"); … … 109 109 while (true) { 110 110 ipc_call_t call; 111 cap_call_handle_t chandle =async_get_call(&call);111 async_get_call(&call); 112 112 113 113 if (!IPC_GET_IMETHOD(call)) … … 118 118 log = handle_create_log(IPC_GET_ARG1(call)); 119 119 if (log == NULL) { 120 async_answer_0( chandle, ENOMEM);120 async_answer_0(&call, ENOMEM); 121 121 break; 122 122 } 123 123 if (!register_log(®istered_logs, log)) { 124 124 log_unlock(log); 125 async_answer_0( chandle, ELIMIT);125 async_answer_0(&call, ELIMIT); 126 126 break; 127 127 } 128 128 log_unlock(log); 129 async_answer_1( chandle, EOK, (sysarg_t) log);129 async_answer_1(&call, EOK, (sysarg_t) log); 130 130 break; 131 131 case LOGGER_WRITER_MESSAGE: 132 132 rc = handle_receive_message(IPC_GET_ARG1(call), 133 133 IPC_GET_ARG2(call)); 134 async_answer_0( chandle, rc);134 async_answer_0(&call, rc); 135 135 break; 136 136 default: 137 async_answer_0( chandle, EINVAL);137 async_answer_0(&call, EINVAL); 138 138 break; 139 139 } … … 144 144 } 145 145 146 147 146 /** 148 147 * @}
Note:
See TracChangeset
for help on using the changeset viewer.