diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-03-01 03:14:23 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-03-01 03:14:23 +0000 |
commit | b0b5f961bd295aee20ca2584b96ebf00e9cb92f3 (patch) | |
tree | 6b16845a701c80c2675bb9aed085227f806e915d /sys/netgraph | |
parent | 9fe9a307306d35d1219be5eb3a88475032b080d0 (diff) | |
download | FreeBSD-src-b0b5f961bd295aee20ca2584b96ebf00e9cb92f3.zip FreeBSD-src-b0b5f961bd295aee20ca2584b96ebf00e9cb92f3.tar.gz |
Rename dup_sockaddr() to sodupsockaddr() for consistency with other
functions in kern_socket.c.
Rename the "canwait" field to "mflags" and pass M_WAITOK and M_NOWAIT
in from the caller context rather than "1" or "0".
Correct mflags pass into mac_init_socket() from previous commit to not
include M_ZERO.
Submitted by: sam
Diffstat (limited to 'sys/netgraph')
4 files changed, 7 insertions, 7 deletions
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c index dd46231..25495ba 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c @@ -1560,7 +1560,7 @@ ng_btsocket_hci_raw_sockaddr(struct socket *so, struct sockaddr **nam) sa.hci_family = AF_BLUETOOTH; strlcpy(sa.hci_node, pcb->addr.hci_node, sizeof(sa.hci_node)); - *nam = dup_sockaddr((struct sockaddr *) &sa, 0); + *nam = sodupsockaddr((struct sockaddr *) &sa, M_NOWAIT); return ((*nam == NULL)? ENOMEM : 0); } /* ng_btsocket_hci_raw_sockaddr */ diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c index f979966..380094a 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c @@ -2435,7 +2435,7 @@ ng_btsocket_l2cap_peeraddr(struct socket *so, struct sockaddr **nam) sa.l2cap_len = sizeof(sa); sa.l2cap_family = AF_BLUETOOTH; - *nam = dup_sockaddr((struct sockaddr *) &sa, 0); + *nam = sodupsockaddr((struct sockaddr *) &sa, M_NOWAIT); return ((*nam == NULL)? ENOMEM : 0); } /* ng_btsocket_l2cap_peeraddr */ @@ -2588,7 +2588,7 @@ ng_btsocket_l2cap_sockaddr(struct socket *so, struct sockaddr **nam) sa.l2cap_len = sizeof(sa); sa.l2cap_family = AF_BLUETOOTH; - *nam = dup_sockaddr((struct sockaddr *) &sa, 0); + *nam = sodupsockaddr((struct sockaddr *) &sa, M_NOWAIT); return ((*nam == NULL)? ENOMEM : 0); } /* ng_btsocket_l2cap_sockaddr */ diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c index 28287bb..3bbfe4ba 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c @@ -1180,7 +1180,7 @@ ng_btsocket_l2cap_raw_peeraddr(struct socket *so, struct sockaddr **nam) sa.l2cap_len = sizeof(sa); sa.l2cap_family = AF_BLUETOOTH; - *nam = dup_sockaddr((struct sockaddr *) &sa, 0); + *nam = sodupsockaddr((struct sockaddr *) &sa, M_NOWAIT); return ((*nam == NULL)? ENOMEM : 0); } /* ng_btsocket_l2cap_raw_peeraddr */ @@ -1219,7 +1219,7 @@ ng_btsocket_l2cap_raw_sockaddr(struct socket *so, struct sockaddr **nam) sa.l2cap_len = sizeof(sa); sa.l2cap_family = AF_BLUETOOTH; - *nam = dup_sockaddr((struct sockaddr *) &sa, 0); + *nam = sodupsockaddr((struct sockaddr *) &sa, M_NOWAIT); return ((*nam == NULL)? ENOMEM : 0); } /* ng_btsocket_l2cap_raw_sockaddr */ diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c index 8827210..5c20618 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c @@ -879,7 +879,7 @@ ng_btsocket_rfcomm_peeraddr(struct socket *so, struct sockaddr **nam) sa.rfcomm_len = sizeof(sa); sa.rfcomm_family = AF_BLUETOOTH; - *nam = dup_sockaddr((struct sockaddr *) &sa, 0); + *nam = sodupsockaddr((struct sockaddr *) &sa, M_NOWAIT); return ((*nam == NULL)? ENOMEM : 0); } /* ng_btsocket_rfcomm_peeraddr */ @@ -945,7 +945,7 @@ ng_btsocket_rfcomm_sockaddr(struct socket *so, struct sockaddr **nam) sa.rfcomm_len = sizeof(sa); sa.rfcomm_family = AF_BLUETOOTH; - *nam = dup_sockaddr((struct sockaddr *) &sa, 0); + *nam = sodupsockaddr((struct sockaddr *) &sa, M_NOWAIT); return ((*nam == NULL)? ENOMEM : 0); } /* ng_btsocket_rfcomm_sockaddr */ |