new helper: msg_data_left()
convert open-coded instances Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
a2dd3793a1
commit
01e97e6517
8 changed files with 27 additions and 23 deletions
|
@ -139,6 +139,11 @@ static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr
|
|||
return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
|
||||
}
|
||||
|
||||
static inline size_t msg_data_left(struct msghdr *msg)
|
||||
{
|
||||
return iov_iter_count(&msg->msg_iter);
|
||||
}
|
||||
|
||||
/* "Socket"-level control message types: */
|
||||
|
||||
#define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue