mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
a2a99e8e12
$ cut -d' ' -f1 /proc/modules|grep _|wc -l 29 $ cut -d' ' -f1 /proc/modules|grep _|sed 's/$/.ko'/g|while read n;do find /lib/modules/`uname -r` -name $n;done|wc -l 12 For instance: $ grep ^aes_x86 /proc/modules aes_x86_64 9056 2 - Live 0xffffffffa0091000 $ l /lib/modules/2.6.31-tip/kernel/arch/x86/crypto/aes-x86_64.ko -rw-r--r-- 1 root root 136438 2009-09-22 19:05 /lib/modules/2.6.31-tip/kernel/arch/x86/crypto/aes-x86_64.ko Handle that by introducing a strxfrchar routine that replaces dashes with underscores when matching file names to loaded modules. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Mike Galbraith <efault@gmx.de> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 lines
231 B
C
12 lines
231 B
C
#ifndef __PERF_STRING_H_
|
|
#define __PERF_STRING_H_
|
|
|
|
#include "types.h"
|
|
|
|
int hex2u64(const char *ptr, u64 *val);
|
|
char *strxfrchar(char *s, char from, char to);
|
|
|
|
#define _STR(x) #x
|
|
#define STR(x) _STR(x)
|
|
|
|
#endif /* __PERF_STRING_H */
|