From: Jiri Olsa <jolsa@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] tools lib api fs: Move cgroupsfs_find_mountpoint()
Date: Mon, 27 Jan 2020 12:12:34 +0100 [thread overview]
Message-ID: <20200127111234.GA1114818@krava> (raw)
In-Reply-To: <20200127100031.1368732-1-namhyung@kernel.org>
On Mon, Jan 27, 2020 at 07:00:31PM +0900, Namhyung Kim wrote:
SNIP
> -
> - if (strlen(path) < maxlen) {
> - strcpy(buf, path);
> - return 0;
> - }
> - return -1;
> -}
> -
> static int open_cgroup(const char *name)
> {
> char path[PATH_MAX + 1];
> @@ -79,7 +20,7 @@ static int open_cgroup(const char *name)
> int fd;
>
>
> - if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1))
> + if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1, "perf_event"))
nice, but could you please follow fs API names and change the
name to cgroupfs__mountpoint
I think we don't need to define the rest of the functions now,
if they are not used
#define FS(name) \
const char *name##__mountpoint(void); \
const char *name##__mount(void); \
bool name##__configured(void); \
just follow the function name
thanks,
jirka
> return -1;
>
> scnprintf(path, PATH_MAX, "%s/%s", mnt, name);
> --
> 2.25.0.341.g760bfbb309-goog
>
next prev parent reply other threads:[~2020-01-27 11:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 10:00 [PATCH] tools lib api fs: Move cgroupsfs_find_mountpoint() Namhyung Kim
2020-01-27 11:12 ` Jiri Olsa [this message]
2020-01-27 14:58 ` Namhyung Kim
2020-01-27 16:22 ` Jiri Olsa
2020-01-28 0:49 ` [PATCH v2] tools lib api fs: Move cgroupsfs__mountpoint() Namhyung Kim
2020-01-28 9:40 ` Jiri Olsa
2020-02-10 19:37 ` Arnaldo Carvalho de Melo
2020-03-19 14:10 ` [tip: perf/core] tools lib api fs: Move cgroupsfs_find_mountpoint() tip-bot2 for Namhyung Kim
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=20200127111234.GA1114818@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
/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.