mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
3c8a67f50a
Provides united way of parsing kernel module path into several components. The new kmod_path__parse function and few defines: int __kmod_path__parse(struct kmod_path *m, const char *path, bool alloc_name, bool alloc_ext); #define kmod_path__parse(__m, __p) __kmod_path__parse(__m, __p, false, false) #define kmod_path__parse_name(__m, __p) __kmod_path__parse(__m, __p, true , false) #define kmod_path__parse_ext(__m, __p) __kmod_path__parse(__m, __p, false, true) parse kernel module @path and updates @m argument like: @comp - true if @path contains supported compression suffix, false otherwise @kmod - true if @path contains '.ko' suffix in right position, false otherwise @name - if (@alloc_name && @kmod) is true, it contains strdup-ed base name of the kernel module without suffixes, otherwise strudup-ed base name of @path @ext - if (@alloc_ext && @comp) is true, it contains strdup-ed string the compression suffix It returns 0 if there's no strdup error, -ENOMEM otherwise. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-9t6eqg8j610r94l743hkntiv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
||
---|---|---|
.. | ||
attr | ||
attr.c | ||
attr.py | ||
bp_signal_overflow.c | ||
bp_signal.c | ||
Build | ||
builtin-test.c | ||
code-reading.c | ||
dso-data.c | ||
dwarf-unwind.c | ||
evsel-roundtrip-name.c | ||
evsel-tp-sched.c | ||
fdarray.c | ||
hists_common.c | ||
hists_common.h | ||
hists_cumulate.c | ||
hists_filter.c | ||
hists_link.c | ||
hists_output.c | ||
keep-tracking.c | ||
kmod-path.c | ||
make | ||
mmap-basic.c | ||
mmap-thread-lookup.c | ||
open-syscall-all-cpus.c | ||
open-syscall-tp-fields.c | ||
open-syscall.c | ||
parse-events.c | ||
parse-no-sample-id-all.c | ||
perf-record.c | ||
perf-targz-src-pkg | ||
perf-time-to-tsc.c | ||
pmu.c | ||
python-use.c | ||
rdpmc.c | ||
sample-parsing.c | ||
sw-clock.c | ||
switch-tracking.c | ||
task-exit.c | ||
tests.h | ||
thread-mg-share.c | ||
vmlinux-kallsyms.c |