Changeset a1a101d in mainline for uspace/srv/net/ethip/pdu.c


Ignore:
Timestamp:
2012-08-17T16:58:51Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc0ccab
Parents:
920d0fc
Message:

Get rid of log_log_msg()

All calls to log_msg(LVL_*) were rewritten to
log_msg(LOG_DEFAULT, LVL_*).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/ethip/pdu.c

    r920d0fc ra1a101d  
    6969            frame->size);
    7070
    71         log_msg(LVL_DEBUG, "Encoding Ethernet frame src=%llx dest=%llx etype=%x",
     71        log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoding Ethernet frame src=%llx dest=%llx etype=%x",
    7272            frame->src, frame->dest, frame->etype_len);
    73         log_msg(LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size);
     73        log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size);
    7474
    7575        *rdata = data;
     
    8383        eth_header_t *hdr;
    8484
    85         log_msg(LVL_DEBUG, "eth_pdu_decode()");
     85        log_msg(LOG_DEFAULT, LVL_DEBUG, "eth_pdu_decode()");
    8686
    8787        if (size < sizeof(eth_header_t)) {
    88                 log_msg(LVL_DEBUG, "PDU too short (%zu)", size);
     88                log_msg(LOG_DEFAULT, LVL_DEBUG, "PDU too short (%zu)", size);
    8989                return EINVAL;
    9090        }
     
    104104            frame->size);
    105105
    106         log_msg(LVL_DEBUG, "Decoding Ethernet frame src=%llx dest=%llx etype=%x",
     106        log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoding Ethernet frame src=%llx dest=%llx etype=%x",
    107107            frame->src, frame->dest, frame->etype_len);
    108         log_msg(LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size);
     108        log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size);
    109109
    110110        return EOK;
     
    143143        uint16_t fopcode;
    144144
    145         log_msg(LVL_DEBUG, "arp_pdu_encode()");
     145        log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_encode()");
    146146
    147147        size = sizeof(arp_eth_packet_fmt_t);
     
    183183        arp_eth_packet_fmt_t *pfmt;
    184184
    185         log_msg(LVL_DEBUG, "arp_pdu_decode()");
     185        log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_decode()");
    186186
    187187        if (size < sizeof(arp_eth_packet_fmt_t)) {
    188                 log_msg(LVL_DEBUG, "ARP PDU too short (%zu)", size);
     188                log_msg(LOG_DEFAULT, LVL_DEBUG, "ARP PDU too short (%zu)", size);
    189189                return EINVAL;
    190190        }
     
    193193
    194194        if (uint16_t_be2host(pfmt->hw_addr_space) != AHRD_ETHERNET) {
    195                 log_msg(LVL_DEBUG, "HW address space != %u (%" PRIu16 ")",
     195                log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address space != %u (%" PRIu16 ")",
    196196                    AHRD_ETHERNET, uint16_t_be2host(pfmt->hw_addr_space));
    197197                return EINVAL;
     
    199199
    200200        if (uint16_t_be2host(pfmt->proto_addr_space) != 0x0800) {
    201                 log_msg(LVL_DEBUG, "Proto address space != %u (%" PRIu16 ")",
     201                log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address space != %u (%" PRIu16 ")",
    202202                    ETYPE_IP, uint16_t_be2host(pfmt->proto_addr_space));
    203203                return EINVAL;
     
    205205
    206206        if (pfmt->hw_addr_size != ETH_ADDR_SIZE) {
    207                 log_msg(LVL_DEBUG, "HW address size != %zu (%zu)",
     207                log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address size != %zu (%zu)",
    208208                    (size_t)ETH_ADDR_SIZE, (size_t)pfmt->hw_addr_size);
    209209                return EINVAL;
     
    211211
    212212        if (pfmt->proto_addr_size != IPV4_ADDR_SIZE) {
    213                 log_msg(LVL_DEBUG, "Proto address size != %zu (%zu)",
     213                log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address size != %zu (%zu)",
    214214                    (size_t)IPV4_ADDR_SIZE, (size_t)pfmt->proto_addr_size);
    215215                return EINVAL;
     
    220220        case AOP_REPLY: packet->opcode = aop_reply; break;
    221221        default:
    222                 log_msg(LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",
     222                log_msg(LOG_DEFAULT, LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",
    223223                    uint16_t_be2host(pfmt->opcode));
    224224                return EINVAL;
     
    231231        packet->target_proto_addr.ipv4 =
    232232            uint32_t_be2host(pfmt->target_proto_addr);
    233         log_msg(LVL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr);
     233        log_msg(LOG_DEFAULT, LVL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr);
    234234
    235235        return EOK;
Note: See TracChangeset for help on using the changeset viewer.