diff options
author | Kumar Gala <galak@freescale.com> | 2005-09-03 18:55:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:05:57 -0400 |
commit | ac6295c289f205bed59b1edfdc4518468db7b1cb (patch) | |
tree | c97f3bf20041ff445489972f9b71b369a1705a2e /arch | |
parent | 9149fb3b8e6913eeb0c80010afef9c55892f6e61 (diff) |
[PATCH] ppc32: removed find_name.c
No one uses find_name.c and no one seems to care about either. So I'm
removing it.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc/kernel/find_name.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/arch/ppc/kernel/find_name.c b/arch/ppc/kernel/find_name.c deleted file mode 100644 index 3c0fa8e0c077..000000000000 --- a/arch/ppc/kernel/find_name.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <asm/page.h> | ||
3 | #include <sys/mman.h> | ||
4 | #include <strings.h> | ||
5 | /* | ||
6 | * Finds a given address in the System.map and prints it out | ||
7 | * with its neighbors. -- Cort | ||
8 | */ | ||
9 | |||
10 | int main(int argc, char **argv) | ||
11 | { | ||
12 | unsigned long addr, cmp, i; | ||
13 | FILE *f; | ||
14 | char s[256], last[256]; | ||
15 | |||
16 | if ( argc < 2 ) | ||
17 | { | ||
18 | fprintf(stderr, "Usage: %s <address>\n", argv[0]); | ||
19 | return -1; | ||
20 | } | ||
21 | |||
22 | for ( i = 1 ; argv[i] ; i++ ) | ||
23 | { | ||
24 | sscanf( argv[i], "%0lx", &addr ); | ||
25 | /* adjust if addr is relative to kernelbase */ | ||
26 | if ( addr < PAGE_OFFSET ) | ||
27 | addr += PAGE_OFFSET; | ||
28 | |||
29 | if ( (f = fopen( "System.map", "r" )) == NULL ) | ||
30 | { | ||
31 | perror("fopen()\n"); | ||
32 | exit(-1); | ||
33 | } | ||
34 | |||
35 | while ( !feof(f) ) | ||
36 | { | ||
37 | fgets(s, 255 , f); | ||
38 | sscanf( s, "%0lx", &cmp ); | ||
39 | if ( addr < cmp ) | ||
40 | break; | ||
41 | strcpy( last, s); | ||
42 | } | ||
43 | |||
44 | printf( "%s%s", last, s ); | ||
45 | } | ||
46 | fclose(f); | ||
47 | return 0; | ||
48 | } | ||