Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset b1912b0c in mainline


Ignore:
Timestamp:
2012-08-17T10:01:19Z (9 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
6e596bd
Parents:
f039dba
Message:

Remove redundant function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/log.c

    rf039dba rb1912b0c  
    6464#define MESSAGE_BUFFER_SIZE 4096
    6565
    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, &reg_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 
    9466static int logger_message(async_sess_t *session, log_t log, log_level_t level, const char *message)
    9567{
     
    178150        }
    179151
    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;
    183155}
    184156
Note: See TracChangeset for help on using the changeset viewer.