Changeset f039dba in mainline for uspace/lib/c/generic/io/logctl.c
- Timestamp:
- 2012-08-17T09:57:27Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b1912b0c
- Parents:
- f72ae3b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/logctl.c
rf72ae3b rf039dba 81 81 } 82 82 83 int logctl_set_top_log_level(const char *namespace, log_level_t new_level) 84 { 85 async_exch_t *exchange = NULL; 86 int rc = start_logger_exchange(&exchange); 87 if (rc != EOK) 88 return rc; 89 90 aid_t reg_msg = async_send_1(exchange, LOGGER_CTL_SET_TOP_LOG_LEVEL, 91 new_level, NULL); 92 rc = async_data_write_start(exchange, namespace, str_size(namespace)); 93 sysarg_t reg_msg_rc; 94 async_wait_for(reg_msg, ®_msg_rc); 95 96 async_exchange_end(exchange); 97 98 if (rc != EOK) { 99 return rc; 100 } 101 102 return (int) reg_msg_rc; 103 } 104 105 int logctl_set_log_level(const char *namespace, const char *context, log_level_t new_level) 83 int logctl_set_log_level(const char *logname, log_level_t new_level) 106 84 { 107 85 async_exch_t *exchange = NULL; … … 112 90 aid_t reg_msg = async_send_1(exchange, LOGGER_CTL_SET_LOG_LEVEL, 113 91 new_level, NULL); 114 rc = async_data_write_start(exchange, namespace, str_size(namespace)); 115 int rc2 = async_data_write_start(exchange, context, str_size(context)); 92 rc = async_data_write_start(exchange, logname, str_size(logname)); 116 93 sysarg_t reg_msg_rc; 117 94 async_wait_for(reg_msg, ®_msg_rc); … … 122 99 return rc; 123 100 124 if (rc2 != EOK)125 return rc2;126 127 101 return (int) reg_msg_rc; 128 102 }
Note:
See TracChangeset
for help on using the changeset viewer.