Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452424
| From | Liviu Dudau <Liviu.Dudau@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] debugfs: Add proxy function for the mmap file operation |
| Date | 2016-07-29 16:40 +0200 |
| Message-ID | <s0h7b-5Pd-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Add proxy function for the mmap file_operations hook under the full_proxy_fops structure. This is useful for providing a custom mmap routine in a driver's debugfs implementation. Cc: Nicolai Stange <nicstange@gmail.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> --- fs/debugfs/file.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index 592059f..d87148a 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c @@ -168,6 +168,10 @@ FULL_PROXY_FUNC(write, ssize_t, filp, loff_t *ppos), ARGS(filp, buf, size, ppos)); +FULL_PROXY_FUNC(mmap, int, filp, + PROTO(struct file *filp, struct vm_area_struct *vma), + ARGS(filp, vma)); + FULL_PROXY_FUNC(unlocked_ioctl, long, filp, PROTO(struct file *filp, unsigned int cmd, unsigned long arg), ARGS(filp, cmd, arg)); @@ -224,6 +228,8 @@ static void __full_proxy_fops_init(struct file_operations *proxy_fops, proxy_fops->write = full_proxy_write; if (real_fops->poll) proxy_fops->poll = full_proxy_poll; + if (real_fops->mmap) + proxy_fops->mmap = full_proxy_mmap; if (real_fops->unlocked_ioctl) proxy_fops->unlocked_ioctl = full_proxy_unlocked_ioctl; } -- 2.9.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] debugfs: Add proxy function for the mmap file operation Liviu Dudau <Liviu.Dudau@arm.com> - 2016-07-29 16:40 +0200
Re: [PATCH] debugfs: Add proxy function for the mmap file operation Nicolai Stange <nicstange@gmail.com> - 2016-07-29 19:40 +0200
Re: [PATCH] debugfs: Add proxy function for the mmap file operation Nicolai Stange <nicstange@gmail.com> - 2016-08-02 20:40 +0200
Re: [PATCH] debugfs: Add proxy function for the mmap file operation Brian Starkey <brian.starkey@arm.com> - 2016-08-05 12:20 +0200
Re: [PATCH] debugfs: Add proxy function for the mmap file operation Nicolai Stange <nicstange@gmail.com> - 2016-08-05 13:20 +0200
csiph-web