summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-21 12:11:46 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:09:57 -0400
commit8280d16172243702ed43432f826ca6130edb4086 (patch)
tree020dff359c5b717a110432159bcc3ec1acf6594e /include
parentfe17f22d7fd0e344ef6447238f799bb49f670c6f (diff)
downloadlinux-stable-8280d16172243702ed43432f826ca6130edb4086.tar.gz
linux-stable-8280d16172243702ed43432f826ca6130edb4086.tar.bz2
linux-stable-8280d16172243702ed43432f826ca6130edb4086.zip
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')
-rw-r--r--include/linux/file.h1
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 *);