Changeset b1912b0c in mainline for uspace/lib/c/generic/io/log.c
- Timestamp:
- 2012-08-17T10:01:19Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6e596bd
- Parents:
- f039dba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/log.c
rf039dba rb1912b0c 64 64 #define MESSAGE_BUFFER_SIZE 4096 65 65 66 67 static int logger_register(async_sess_t *session, const char *prog_name)68 {69 async_exch_t *exchange = async_exchange_begin(session);70 if (exchange == NULL) {71 return ENOMEM;72 }73 74 ipc_call_t answer;75 aid_t reg_msg = async_send_1(exchange, LOGGER_WRITER_CREATE_LOG, LOG_NO_PARENT, &answer);76 int rc = async_data_write_start(exchange, prog_name, str_size(prog_name));77 sysarg_t reg_msg_rc;78 async_wait_for(reg_msg, ®_msg_rc);79 80 async_exchange_end(exchange);81 82 if (rc != EOK) {83 return rc;84 }85 86 if (reg_msg_rc != EOK)87 return reg_msg_rc;88 89 default_log_id = IPC_GET_ARG1(answer);90 91 return EOK;92 }93 94 66 static int logger_message(async_sess_t *session, log_t log, log_level_t level, const char *message) 95 67 { … … 178 150 } 179 151 180 int rc = logger_register(logger_session, log_prog_name);181 182 return rc;152 default_log_id = log_create(prog_name, LOG_NO_PARENT); 153 154 return EOK; 183 155 } 184 156
Note:
See TracChangeset
for help on using the changeset viewer.