From 8280d16172243702ed43432f826ca6130edb4086 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 21 Aug 2012 12:11:46 -0400 Subject: new helper: replace_fd() analog of dup2(), except that it takes struct file * as source. Signed-off-by: Al Viro --- include/linux/file.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/file.h') 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 *); -- cgit