summaryrefslogtreecommitdiff
path: root/sys/netbt/hci_unit.c
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2010-07-02 02:40:18 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2010-07-02 02:40:18 +0000
commitbfc9493d9280a5a8ab43b8df30cd772c910140ba (patch)
tree32334a91bf10c89a8551f90fe6749d45476d9ad8 /sys/netbt/hci_unit.c
parent364840df3893a5f720df05ee307b996c62195a07 (diff)
m_copyback can fail to allocate memory, but is a void fucntion so gymnastics
are required to detect that. Change the function to take a wait argument (used in nfs server, but M_NOWAIT everywhere else for now) and to return an error ok claudio@ henning@ krw@
Diffstat (limited to 'sys/netbt/hci_unit.c')
-rw-r--r--sys/netbt/hci_unit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netbt/hci_unit.c b/sys/netbt/hci_unit.c
index 10700775447..7a04936fbf8 100644
--- a/sys/netbt/hci_unit.c
+++ b/sys/netbt/hci_unit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hci_unit.c,v 1.10 2008/11/22 16:56:39 uwe Exp $ */
+/* $OpenBSD: hci_unit.c,v 1.11 2010/07/02 02:40:16 blambert Exp $ */
/* $NetBSD: hci_unit.c,v 1.12 2008/06/26 14:17:27 plunky Exp $ */
/*-
@@ -316,7 +316,7 @@ hci_send_cmd(struct hci_unit *unit, uint16_t opcode, void *buf, uint8_t len)
if (len) {
KASSERT(buf != NULL);
- m_copyback(m, sizeof(hci_cmd_hdr_t), len, buf);
+ m_copyback(m, sizeof(hci_cmd_hdr_t), len, buf, M_NOWAIT);
if (m->m_pkthdr.len != (sizeof(hci_cmd_hdr_t) + len)) {
m_freem(m);
return ENOMEM;