From: Randy Dunlap <randy.dunlap@oracle.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Török Edwin" <edwintorok@gmail.com>,
"Christoph Hellwig" <hch@infradead.org>,
"Alexander Viro" <viro@ftp.linux.org.uk>,
srostedt@redhat.com, a.p.zijlstra@chello.nl,
sandmann@daimi.au.dk, linux-kernel@vger.kernel.org,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH] vfs, seqfile: make mangle_path() global
Date: Sun, 23 Nov 2008 13:06:16 -0800 [thread overview]
Message-ID: <4929C5C8.7090008@oracle.com> (raw)
In-Reply-To: <20081123084737.GE30453@elte.hu>
Ingo Molnar wrote:
> * Török Edwin <edwintorok@gmail.com> wrote:
>
>> fs/seq_file.c | 14 +++++++-
>> include/linux/seq_file.h | 1 +
>
> Note, i've split these bits out into a separate patch - see it
> attached below.
>
> Ingo
>
> ------------------>
> From 74e2f334f4440cbcb63e9ebbcdcea430d41bdfa3 Mon Sep 17 00:00:00 2001
> From: =?utf-8?q?T=C3=B6r=C3=B6k=20Edwin?= <edwintorok@gmail.com>
> Date: Sat, 22 Nov 2008 13:28:48 +0200
> Subject: [PATCH] vfs, seqfile: make mangle_path() global
> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: 8bit
>
> Impact: expose new VFS API
>
> make mangle_path() available, as per the suggestions of Christoph Hellwig
> and Al Viro:
>
> http://lkml.org/lkml/2008/11/4/338
>
> Signed-off-by: Török Edwin <edwintorok@gmail.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
> fs/seq_file.c | 14 +++++++++++++-
> include/linux/seq_file.h | 1 +
> 2 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/fs/seq_file.c b/fs/seq_file.c
> index eba2eab..f5b61cc 100644
> --- a/fs/seq_file.c
> +++ b/fs/seq_file.c
> @@ -357,7 +357,18 @@ int seq_printf(struct seq_file *m, const char *f, ...)
> }
> EXPORT_SYMBOL(seq_printf);
>
> -static char *mangle_path(char *s, char *p, char *esc)
> +/**
> + * mangle_path - mangle and copy path to buffer beginning
> + * @s - buffer start
> + * @p - beginning of path in above buffer
> + * @esc - set of characters that need escaping
Format for function parameters is:
* @esc: set of characters that need escaping
please. (i.e., use : instead of -)
> + *
> + * Copy the path from @p to @s, replacing each occurrence of character from
> + * @esc with usual octal escape.
> + * Returns pointer past last written character in @s, or NULL in case of
> + * failure.
> + */
> +char *mangle_path(char *s, char *p, char *esc)
> {
> while (s <= p) {
> char c = *p++;
> @@ -376,6 +387,7 @@ static char *mangle_path(char *s, char *p, char *esc)
> }
> return NULL;
> }
> +EXPORT_SYMBOL_GPL(mangle_path);
>
> /*
> * return the absolute path of 'dentry' residing in mount 'mnt'.
> diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
> index dc50bcc..b3dfa72 100644
> --- a/include/linux/seq_file.h
> +++ b/include/linux/seq_file.h
> @@ -34,6 +34,7 @@ struct seq_operations {
>
> #define SEQ_SKIP 1
>
> +char *mangle_path(char *s, char *p, char *esc);
> int seq_open(struct file *, const struct seq_operations *);
> ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
> loff_t seq_lseek(struct file *, loff_t, int);
--
~Randy
next prev parent reply other threads:[~2008-11-23 21:07 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-22 11:28 [PATCH 0/2] tracing: userspace stacktraces Török Edwin
2008-11-22 11:28 ` [PATCH 1/2] tracing: add support for userspace stacktraces in tracing/iter_ctrl Török Edwin
2008-11-23 8:37 ` Ingo Molnar
2008-11-23 10:39 ` [PATCH 3/3] tracing/stack-tracer: introduce CONFIG_USER_STACKTRACE_SUPPORT Török Edwin
2008-11-22 11:28 ` [PATCH 2/2] tracing: identify which executable object the userspace address belongs to Török Edwin
2008-11-23 8:47 ` [PATCH] vfs, seqfile: make mangle_path() global Ingo Molnar
2008-11-23 21:06 ` Randy Dunlap [this message]
2008-11-23 21:24 ` [PATCH] fix comment style on mangle_path Török Edwin
2008-11-23 21:36 ` Ingo Molnar
2008-11-28 10:05 ` [PATCH] vfs, seqfile: make mangle_path() global Al Viro
2008-11-28 17:08 ` Ingo Molnar
2008-11-23 8:53 ` [PATCH 2/2] tracing: identify which executable object the userspace address belongs to Ingo Molnar
2008-11-23 10:39 ` [PATCH 1/3] tracing/stack-tracer: fix style issues Török Edwin
2008-11-23 10:39 ` [PATCH 2/3] tracing/stack-tracer: fix locking Török Edwin
2008-11-23 10:52 ` Ingo Molnar
2008-11-23 10:59 ` Török Edwin
2008-11-23 11:01 ` Ingo Molnar
2008-11-23 11:04 ` Török Edwin
2008-11-23 11:07 ` Ingo Molnar
2008-11-23 11:08 ` [PATCH] tracing/stack-tracer: avoid races accessing file Török Edwin
2008-11-23 11:20 ` Ingo Molnar
2008-11-25 14:40 ` [PATCH 2/2] tracing: identify which executable object the userspace address belongs to Frank Ch. Eigler
2008-11-26 9:59 ` Török Edwin
2008-11-27 10:41 ` Peter Zijlstra
2008-11-27 12:48 ` Frank Ch. Eigler
2008-11-27 13:02 ` Peter Zijlstra
2008-11-27 13:03 ` Török Edwin
2008-11-27 14:10 ` Ingo Molnar
2008-11-27 14:27 ` Török Edwin
2008-11-27 14:51 ` Ingo Molnar
2008-12-09 19:49 ` Török Edwin
2008-11-23 8:26 ` [PATCH 0/2] tracing: userspace stacktraces Ingo Molnar
2008-11-23 9:24 ` Török Edwin
2008-11-23 9:30 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4929C5C8.7090008@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=a.p.zijlstra@chello.nl \
--cc=edwintorok@gmail.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sandmann@daimi.au.dk \
--cc=srostedt@redhat.com \
--cc=viro@ftp.linux.org.uk \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.