diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-07-30 04:13:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-08-01 11:25:23 -0400 |
commit | 1027abe8827b47f7e9c4ed6514fde3d44f79963c (patch) | |
tree | be6aba7e46176534cc71622de53a8bcbf28a06c4 /include/linux/file.h | |
parent | a1bc6eb4b499ae67ada9a01660010580b6569403 (diff) |
[PATCH] merge locate_fd() and get_unused_fd()
New primitive: alloc_fd(start, flags). get_unused_fd() and
get_unused_fd_flags() become wrappers on top of it.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/file.h')
-rw-r--r-- | include/linux/file.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/file.h b/include/linux/file.h index 27c64bdc68c9..a20259e248a5 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -34,8 +34,9 @@ extern struct file *fget(unsigned int fd); | |||
34 | extern struct file *fget_light(unsigned int fd, int *fput_needed); | 34 | extern struct file *fget_light(unsigned int fd, int *fput_needed); |
35 | extern void set_close_on_exec(unsigned int fd, int flag); | 35 | extern void set_close_on_exec(unsigned int fd, int flag); |
36 | extern void put_filp(struct file *); | 36 | extern void put_filp(struct file *); |
37 | extern int alloc_fd(unsigned start, unsigned flags); | ||
37 | extern int get_unused_fd(void); | 38 | extern int get_unused_fd(void); |
38 | extern int get_unused_fd_flags(int flags); | 39 | #define get_unused_fd_flags(flags) alloc_fd(0, (flags)) |
39 | extern void put_unused_fd(unsigned int fd); | 40 | extern void put_unused_fd(unsigned int fd); |
40 | 41 | ||
41 | extern void fd_install(unsigned int fd, struct file *file); | 42 | extern void fd_install(unsigned int fd, struct file *file); |