diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-21 20:11:46 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-27 05:09:57 +0400 |
commit | 8280d16172243702ed43432f826ca6130edb4086 (patch) | |
tree | 020dff359c5b717a110432159bcc3ec1acf6594e /include/linux/file.h | |
parent | fe17f22d7fd0e344ef6447238f799bb49f670c6f (diff) | |
download | linux-8280d16172243702ed43432f826ca6130edb4086.tar.xz |
new helper: replace_fd()
analog of dup2(), except that it takes struct file * as source.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/file.h')
-rw-r--r-- | include/linux/file.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/file.h b/include/linux/file.h index da84fa0f4579..6239591a6122 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -31,6 +31,7 @@ extern struct file *fget_light(unsigned int fd, int *fput_needed); extern struct file *fget_raw(unsigned int fd); extern struct file *fget_raw_light(unsigned int fd, int *fput_needed); extern int f_dupfd(unsigned int from, struct file *file, unsigned flags); +extern int replace_fd(unsigned fd, struct file *file, unsigned flags); extern void set_close_on_exec(unsigned int fd, int flag); extern bool get_close_on_exec(unsigned int fd); extern void put_filp(struct file *); |