History

net: add __sys_accept4_file() helper

This is identical to __sys_accept4(), except it takes a struct file instead of an fd, and it also allows passing in extra file->f_flags flags. The latter is done to support masking in O_NONBLOCK without manipulating the original file flags. No functional changes in this patch.

Jens Axboe committed 7 years ago

Commit de2ea4b1 parent fcb323c2 files · +44 −24Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/socket.h+3−0
@@ -392,6 +392,9 @@ extern int __sys_recvfrom(int fd, void __user *ubuf, size_t size, · 391 unmodified lines
392392 extern int __sys_sendto(int fd, void __user *buff, size_t len,
393393 unsigned int flags, struct sockaddr __user *addr,
394394 int addr_len);
395+extern int __sys_accept4_file(struct file *file, unsigned file_flags,
396+ struct sockaddr __user *upeer_sockaddr,
397+ int __user *upeer_addrlen, int flags);
395398 extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
396399 int __user *upeer_addrlen, int flags);
397400 extern int __sys_socket(int family, int type, int protocol);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t