Make sure Bluetooth stuff can be compiled on amd64

Submitted by:	ps
This commit is contained in:
Maksim Yevmenkin 2004-04-09 23:01:42 +00:00
parent bbecd97c0b
commit 4ae439a316
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128076
14 changed files with 59 additions and 59 deletions

View File

@ -312,7 +312,7 @@ sdp_print(uint32_t level, uint8_t const *start, uint8_t const *end)
break;
case SDP_DATA_UINT64:
SDP_GET64(value.uint64, start);
printf("uint64 %llu\n", value.uint64);
printf("uint64 %ju\n", value.uint64);
break;
case SDP_DATA_UINT128:
@ -342,7 +342,7 @@ sdp_print(uint32_t level, uint8_t const *start, uint8_t const *end)
break;
case SDP_DATA_INT64:
SDP_GET64(value.int64, start);
printf("int64 %lld\n", value.int64);
printf("int64 %ju\n", value.int64);
break;
case SDP_DATA_UUID16:

View File

@ -919,7 +919,7 @@ ubt_request_start(ubt_softc_p sc)
if (m->m_pkthdr.len > UBT_CTRL_BUFFER_SIZE)
panic(
"%s: %s - HCI command frame too big, size=%d, len=%d\n",
"%s: %s - HCI command frame too big, size=%zd, len=%d\n",
__func__, USBDEVNAME(sc->sc_dev), UBT_CTRL_BUFFER_SIZE,
m->m_pkthdr.len);

View File

@ -357,7 +357,7 @@ sync_con_queue(ng_hci_unit_p unit, ng_hci_unit_con_p con, int completed)
state->con_handle = con->con_handle;
state->completed = completed;
NG_SEND_MSG_HOOK(error, unit->node, msg, hook, NULL);
NG_SEND_MSG_HOOK(error, unit->node, msg, hook, 0);
return (error);
} /* sync_con_queue */

View File

@ -111,7 +111,7 @@ ng_hci_node_is_up(node_p node, hook_p hook, void *arg1, int arg2)
bcopy(&unit->bdaddr, &ep->bdaddr, sizeof(ep->bdaddr));
NG_SEND_MSG_HOOK(error, node, msg, hook, NULL);
NG_SEND_MSG_HOOK(error, node, msg, hook, 0);
} else
error = ENOMEM;

View File

@ -590,7 +590,7 @@ ng_hci_lp_con_cfm(ng_hci_unit_con_p con, int status)
sizeof(ep->bdaddr));
NG_SEND_MSG_HOOK(error, unit->node, msg,
unit->acl, NULL);
unit->acl, 0);
}
} else
NG_HCI_INFO(
@ -613,7 +613,7 @@ ng_hci_lp_con_cfm(ng_hci_unit_con_p con, int status)
sizeof(ep->bdaddr));
NG_SEND_MSG_HOOK(error, unit->node, msg,
unit->sco, NULL);
unit->sco, 0);
}
} else
NG_HCI_INFO(
@ -660,7 +660,7 @@ ng_hci_lp_con_ind(ng_hci_unit_con_p con, u_int8_t *uclass)
bcopy(uclass, ep->uclass, sizeof(ep->uclass));
bcopy(&con->bdaddr, &ep->bdaddr, sizeof(ep->bdaddr));
NG_SEND_MSG_HOOK(error, unit->node, msg, hook, NULL);
NG_SEND_MSG_HOOK(error, unit->node, msg, hook, 0);
} else {
NG_HCI_WARN(
"%s: %s - Upstream hook is not connected or not valid, hook=%p\n",
@ -897,7 +897,7 @@ ng_hci_lp_discon_ind(ng_hci_unit_con_p con, int reason)
ep->link_type = con->link_type;
ep->con_handle = con->con_handle;
NG_SEND_MSG_HOOK(error,unit->node,msg,unit->acl,NULL);
NG_SEND_MSG_HOOK(error,unit->node,msg,unit->acl,0);
} else
NG_HCI_INFO(
"%s: %s - ACL hook is not connected or not valid, hook=%p\n",
@ -915,7 +915,7 @@ ng_hci_lp_discon_ind(ng_hci_unit_con_p con, int reason)
ep->link_type = con->link_type;
ep->con_handle = con->con_handle;
NG_SEND_MSG_HOOK(error, unit->node, msg, unit->sco, NULL);
NG_SEND_MSG_HOOK(error, unit->node, msg, unit->sco, 0);
} else
NG_HCI_INFO(
"%s: %s - SCO hook is not connected or not valid, hook=%p\n",
@ -1059,7 +1059,7 @@ ng_hci_lp_qos_cfm(ng_hci_unit_con_p con, int status)
ep->con_handle = con->con_handle;
NG_SEND_MSG_HOOK(error, unit->node, msg,
unit->acl, NULL);
unit->acl, 0);
}
} else
NG_HCI_INFO(
@ -1079,7 +1079,7 @@ ng_hci_lp_qos_cfm(ng_hci_unit_con_p con, int status)
ep->con_handle = con->con_handle;
NG_SEND_MSG_HOOK(error, unit->node, msg,
unit->sco, NULL);
unit->sco, 0);
}
} else
NG_HCI_INFO(
@ -1118,7 +1118,7 @@ ng_hci_lp_qos_ind(ng_hci_unit_con_p con)
ep = (ng_hci_lp_qos_ind_ep *) msg->data;
ep->con_handle = con->con_handle;
NG_SEND_MSG_HOOK(error, unit->node, msg, unit->acl, NULL);
NG_SEND_MSG_HOOK(error, unit->node, msg, unit->acl, 0);
} else
NG_HCI_INFO(
"%s: %s - ACL hook is not connected or not valid, hook=%p\n",
@ -1133,7 +1133,7 @@ ng_hci_lp_qos_ind(ng_hci_unit_con_p con)
ep = (ng_hci_lp_qos_ind_ep *) msg->data;
ep->con_handle = con->con_handle;
NG_SEND_MSG_HOOK(error, unit->node, msg, unit->sco, NULL);
NG_SEND_MSG_HOOK(error, unit->node, msg, unit->sco, 0);
} else
NG_HCI_INFO(
"%s: %s - SCO hook is not connected or not valid, hook=%p\n",

View File

@ -51,7 +51,7 @@ MALLOC_DECLARE(M_NETGRAPH_HCI);
if ((m)->m_len < (s)) \
(m) = m_pullup((m), (s)); \
if ((m) == NULL) \
NG_HCI_ALERT("%s: %s - m_pullup(%d) failed\n", \
NG_HCI_ALERT("%s: %s - m_pullup(%zd) failed\n", \
__func__, NG_NODE_NAME(unit->node), (s)); \
} while (0)

View File

@ -109,7 +109,7 @@ ng_l2cap_receive(ng_l2cap_con_p con)
/* Check payload size */
if (hdr->length != con->rx_pkt->m_pkthdr.len - sizeof(*hdr)) {
NG_L2CAP_ERR(
"%s: %s - invalid L2CAP packet. Payload length mismatch, length=%d, len=%d\n",
"%s: %s - invalid L2CAP packet. Payload length mismatch, length=%d, len=%zd\n",
__func__, NG_NODE_NAME(l2cap->node), hdr->length,
con->rx_pkt->m_pkthdr.len - sizeof(*hdr));
error = EMSGSIZE;
@ -973,7 +973,7 @@ ng_l2cap_process_echo_req(ng_l2cap_con_p con, u_int8_t ident)
con->rx_pkt = ng_l2cap_prepend(con->rx_pkt, sizeof(*hdr));
if (con->rx_pkt == NULL) {
NG_L2CAP_ALERT(
"%s: %s - ng_l2cap_prepend() failed, size=%d\n",
"%s: %s - ng_l2cap_prepend() failed, size=%zd\n",
__func__, NG_NODE_NAME(l2cap->node), sizeof(*hdr));
return (ENOBUFS);

View File

@ -112,7 +112,7 @@ ng_l2cap_lp_con_req(ng_l2cap_p l2cap, bdaddr_p bdaddr)
con->state = NG_L2CAP_W4_LP_CON_CFM;
ng_l2cap_lp_timeout(con);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, 0);
if (error != 0) {
if ((error = ng_l2cap_lp_untimeout(con)) != 0)
return (error);
@ -262,7 +262,7 @@ ng_l2cap_lp_con_ind(ng_l2cap_p l2cap, struct ng_mesg *msg)
con->state = NG_L2CAP_W4_LP_CON_CFM;
ng_l2cap_lp_timeout(con);
NG_SEND_MSG_HOOK(error, l2cap->node, rsp, l2cap->hci, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, rsp, l2cap->hci, 0);
if (error != 0) {
if ((error = ng_l2cap_lp_untimeout(con)) != 0)
goto out;
@ -393,7 +393,7 @@ ng_l2cap_lp_qos_req(ng_l2cap_p l2cap, u_int16_t con_handle,
ep->latency = flow->latency;
ep->delay_variation = flow->delay_variation;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, 0);
return (error);
} /* ng_l2cap_lp_con_req */
@ -497,7 +497,7 @@ ng_l2cap_lp_send(ng_l2cap_con_p con, u_int16_t dcid, struct mbuf *m0)
m0 = ng_l2cap_prepend(m0, sizeof(*l2cap_hdr));
if (m0 == NULL) {
NG_L2CAP_ALERT(
"%s: %s - ng_l2cap_prepend(%d) failed\n",
"%s: %s - ng_l2cap_prepend(%zd) failed\n",
__func__, NG_NODE_NAME(l2cap->node),
sizeof(*l2cap_hdr));
@ -535,7 +535,7 @@ ng_l2cap_lp_send(ng_l2cap_con_p con, u_int16_t dcid, struct mbuf *m0)
m0 = ng_l2cap_prepend(m0, sizeof(*acl_hdr));
if (m0 == NULL) {
NG_L2CAP_ALERT(
"%s: %s - ng_l2cap_prepend(%d) failed\n",
"%s: %s - ng_l2cap_prepend(%zd) failed\n",
__func__, NG_NODE_NAME(l2cap->node),
sizeof(*acl_hdr));
goto fail;
@ -899,6 +899,6 @@ ng_l2cap_process_discon_timeout(node_p node, hook_p hook, void *arg1, int con_ha
ep->con_handle = con->con_handle;
ep->reason = 0x13; /* User Ended Connection */
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, 0);
} /* ng_l2cap_process_discon_timeout */

View File

@ -79,7 +79,7 @@ ng_l2cap_send_hook_info(node_p node, hook_p hook, void *arg1, int arg2)
sizeof(bdaddr_t), M_NOWAIT);
if (msg != NULL) {
bcopy(&l2cap->bdaddr, msg->data, sizeof(bdaddr_t));
NG_SEND_MSG_HOOK(error, node, msg, hook, NULL);
NG_SEND_MSG_HOOK(error, node, msg, hook, 0);
} else
error = ENOMEM;

View File

@ -185,7 +185,7 @@ ng_l2cap_l2ca_con_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result,
op->result = result;
op->status = status;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
}
return (error);
@ -333,7 +333,7 @@ ng_l2cap_l2ca_con_rsp_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result)
op = (ng_l2cap_l2ca_con_rsp_op *)(msg->data);
op->result = result;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
}
return (error);
@ -374,7 +374,7 @@ ng_l2cap_l2ca_con_ind(ng_l2cap_chan_p ch)
ip->psm = ch->psm;
ip->ident = ch->ident;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
}
return (error);
@ -524,7 +524,7 @@ ng_l2cap_l2ca_cfg_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result)
bcopy(&ch->oflow, &op->oflow, sizeof(op->oflow));
op->flush_timo = ch->flush_timo;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
if (error == 0 && result == NG_L2CAP_SUCCESS) {
ch->cfg_state |= NG_L2CAP_CFG_IN;
@ -680,7 +680,7 @@ ng_l2cap_l2ca_cfg_rsp_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result)
op = (ng_l2cap_l2ca_cfg_rsp_op *)(msg->data);
op->result = result;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
}
return (error);
@ -733,7 +733,7 @@ ng_l2cap_l2ca_cfg_ind(ng_l2cap_chan_p ch)
bcopy(&ch->iflow, &ip->iflow, sizeof(ip->iflow));
ip->flush_timo = ch->flush_timo;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
}
return (error);
@ -865,7 +865,7 @@ ng_l2cap_l2ca_write_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result,
op->length = length;
op->lcid = ch->scid;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
}
return (error);
@ -1059,7 +1059,7 @@ ng_l2cap_l2ca_qos_ind(ng_l2cap_chan_p ch)
else {
ip = (ng_l2cap_l2ca_qos_ind_ip *)(msg->data);
bcopy(&ch->con->remote, &ip->bdaddr, sizeof(ip->bdaddr));
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
}
return (error);
@ -1179,7 +1179,7 @@ ng_l2cap_l2ca_discon_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result)
op = (ng_l2cap_l2ca_discon_op *)(msg->data);
op->result = result;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
}
return (error);
@ -1215,7 +1215,7 @@ ng_l2cap_l2ca_discon_ind(ng_l2cap_chan_p ch)
else {
ip = (ng_l2cap_l2ca_discon_ind_ip *)(msg->data);
ip->lcid = ch->scid;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
}
return (error);
@ -1409,7 +1409,7 @@ ng_l2cap_l2ca_ping_rsp(ng_l2cap_con_p con, u_int32_t token, u_int16_t result,
m_copydata(data, 0, size, (caddr_t) op + sizeof(*op));
}
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, 0);
}
out:
NG_FREE_M(data);
@ -1529,7 +1529,7 @@ ng_l2cap_l2ca_get_info_rsp(ng_l2cap_con_p con, u_int32_t token,
m_copydata(data, 0, size, (caddr_t) op + sizeof(*op));
}
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, NULL);
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, 0);
}
out:
NG_FREE_M(data);
@ -1632,7 +1632,7 @@ ng_l2cap_l2ca_enable_clt(ng_l2cap_p l2cap, struct ng_mesg *msg)
*
* /* Send response to control hook */
* if (l2cap->ctl != NULL && NG_HOOK_IS_VALID(l2cap->ctl))
* NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, NULL);
* NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->ctl, 0);
#endif
return (error);

View File

@ -51,7 +51,7 @@ MALLOC_DECLARE(M_NETGRAPH_L2CAP);
if ((m)->m_len < (s)) \
(m) = m_pullup((m), (s)); \
if ((m) == NULL) \
NG_L2CAP_ALERT("%s: %s - m_pullup(%d) failed\n", \
NG_L2CAP_ALERT("%s: %s - m_pullup(%zd) failed\n", \
__func__, NG_NODE_NAME(l2cap->node), (s)); \
} while (0)

View File

@ -250,9 +250,9 @@ hcirawpr(kvm_t *kvmd, u_long addr)
}
fprintf(stdout,
"%-8.8x %-8.8x %-6.6x %6d %6d %-16.16s\n",
(int) pcb.so,
(int) this,
"%-8lx %-8lx %-6.6x %6d %6d %-16.16s\n",
(unsigned long) pcb.so,
(unsigned long) this,
pcb.flags,
so.so_rcv.sb_cc,
so.so_snd.sb_cc,
@ -299,9 +299,9 @@ l2caprawpr(kvm_t *kvmd, u_long addr)
}
fprintf(stdout,
"%-8.8x %-8.8x %6d %6d %-17.17s\n",
(int) pcb.so,
(int) this,
"%-8lx %-8lx %6d %6d %-17.17s\n",
(unsigned long) pcb.so,
(unsigned long) this,
so.so_rcv.sb_cc,
so.so_snd.sb_cc,
bdaddrpr(&pcb.src, NULL, 0));
@ -358,8 +358,8 @@ l2cappr(kvm_t *kvmd, u_long addr)
}
fprintf(stdout,
"%-8.8x %6d %6d %-17.17s/%-5d %-17.17s %-5d %s\n",
(int) this,
"%-8lx %6d %6d %-17.17s/%-5d %-17.17s %-5d %s\n",
(unsigned long) this,
so.so_rcv.sb_cc,
so.so_snd.sb_cc,
bdaddrpr(&pcb.src, local, sizeof(local)),
@ -405,9 +405,9 @@ l2caprtpr(kvm_t *kvmd, u_long addr)
}
fprintf(stdout,
"%-8.8x %-8.8x %-17.17s\n",
(int) this,
(int) rt.hook,
"%-8lx %-8lx %-17.17s\n",
(unsigned long) this,
(unsigned long) rt.hook,
bdaddrpr(&rt.src, NULL, 0));
}
} /* l2caprtpr */
@ -464,8 +464,8 @@ rfcommpr(kvm_t *kvmd, u_long addr)
}
fprintf(stdout,
"%-8.8x %6d %6d %-17.17s %-17.17s %-4d %-4d %s\n",
(int) this,
"%-8lx %6d %6d %-17.17s %-17.17s %-4d %-4d %s\n",
(unsigned long) this,
so.so_rcv.sb_cc,
so.so_snd.sb_cc,
bdaddrpr(&pcb.src, local, sizeof(local)),
@ -527,9 +527,9 @@ rfcommpr_s(kvm_t *kvmd, u_long addr)
}
fprintf(stdout,
"%-8.8x %-8.8x %-4x %-5d %-5d %-4s %s\n",
(int) so.so_pcb,
(int) this,
"%-8lx %-8lx %-4x %-5d %-5d %-4s %s\n",
(unsigned long) so.so_pcb,
(unsigned long) this,
s.flags,
s.mtu,
s.outq.len,

View File

@ -267,7 +267,7 @@ usage(void)
fprintf(stderr, "\t-f - No delay (soft of flood)\n");
fprintf(stderr, "\t-i wait - Delay between packets (sec)\n");
fprintf(stderr, "\t-s size - Packet size (bytes), " \
"between %d and %d\n", sizeof(int32_t), NG_L2CAP_MAX_ECHO_SIZE);
"between %zd and %zd\n", sizeof(int32_t), NG_L2CAP_MAX_ECHO_SIZE);
fprintf(stderr, "\t-h - Display this message\n");
exit(255);

View File

@ -76,7 +76,7 @@ print_service_class_id_list(uint8_t const *start, uint8_t const *end)
if (end - start < 2) {
fprintf(stderr, "Invalid Service Class ID List. " \
"Too short, len=%d\n", end - start);
"Too short, len=%zd\n", end - start);
return;
}
@ -230,7 +230,7 @@ print_protocol_descriptor(uint8_t const *start, uint8_t const *end)
case SDP_DATA_UINT64:
case SDP_DATA_INT64:
SDP_GET64(value.uint64, start);
fprintf(stdout, "u/int64 %llu\n", value.uint64);
fprintf(stdout, "u/int64 %ju\n", value.uint64);
break;
case SDP_DATA_UINT128:
@ -307,7 +307,7 @@ print_protocol_descriptor_list(uint8_t const *start, uint8_t const *end)
if (end - start < 2) {
fprintf(stderr, "Invalid Protocol Descriptor List. " \
"Too short, len=%d\n", end - start);
"Too short, len=%zd\n", end - start);
return;
}
@ -381,7 +381,7 @@ print_bluetooth_profile_descriptor_list(uint8_t const *start, uint8_t const *end
if (end - start < 2) {
fprintf(stderr, "Invalid Bluetooth Profile Descriptor List. " \
"Too short, len=%d\n", end - start);
"Too short, len=%zd\n", end - start);
return;
}