[patch 1/4] delete unused file arch_ppc_kernel_find_name.c

Subsystems: the rest · Maintainer: Linus Torvalds

STALE7906d

4 messages, 3 authors, 2005-03-07 · open the first message on its own page

[patch 1/4] delete unused file arch_ppc_kernel_find_name.c

From: <hidden>
Date: 2005-03-06 22:23:09

Remove nowhere referenced file. (egrep "filename\." didn't find anything)

Signed-off-by: Domen Puncer <redacted>
---


 kj/arch/ppc/kernel/find_name.c |   48 -----------------------------------------
 1 files changed, 48 deletions(-)

diff -L arch/ppc/kernel/find_name.c -puN arch/ppc/kernel/find_name.c~remove_file-arch_ppc_kernel_find_name.c /dev/null
--- kj/arch/ppc/kernel/find_name.c
+++ /dev/null	2005-03-02 11:34:59.000000000 +0100
@@ -1,48 +0,0 @@
-#include <stdio.h>
-#include <asm/page.h>
-#include <sys/mman.h>
-#include <strings.h>
-/*
- * Finds a given address in the System.map and prints it out
- * with its neighbors.  -- Cort
- */
-
-int main(int argc, char **argv)
-{
-	unsigned long addr, cmp, i;
-	FILE *f;
-	char s[256], last[256];
-	
-	if ( argc < 2 )
-	{
-		fprintf(stderr, "Usage: %s <address>\n", argv[0]);
-		return -1;
-	}
-
-	for ( i = 1 ; argv[i] ; i++ )
-	{
-		sscanf( argv[i], "%0lx", &addr );
-		/* adjust if addr is relative to kernelbase */
-		if ( addr < PAGE_OFFSET )
-			addr += PAGE_OFFSET;
-		
-		if ( (f = fopen( "System.map", "r" )) == NULL )
-		{
-			perror("fopen()\n");
-			exit(-1);
-		}
-		
-		while ( !feof(f) )
-		{
-			fgets(s, 255 , f);
-			sscanf( s, "%0lx", &cmp );
-			if ( addr < cmp )
-				break;
-			strcpy( last, s);
-		}
-		
-		printf( "%s%s", last, s );
-	}		
-	fclose(f);
-	return 0;
-}
_

Re: [patch 1/4] delete unused file arch_ppc_kernel_find_name.c

From: Joerg Dorchain <hidden>
Date: 2005-03-07 07:37:30

On Sun, Mar 06, 2005 at 11:22:56PM +0100, domen@coderock.org wrote:
Remove nowhere referenced file. (egrep "filename\." didn't find anything)
To me it looks more like a devloper aid than a kernel file. Ok, it
functionality could be replaced by a grep -C, but really delete it?

Joerg

Re: [patch 1/4] delete unused file arch_ppc_kernel_find_name.c

From: Domen Puncer <hidden>
Date: 2005-03-07 08:25:26

On 07/03/05 08:37 +0100, Joerg Dorchain wrote:
On Sun, Mar 06, 2005 at 11:22:56PM +0100, domen@coderock.org wrote:
quoted
Remove nowhere referenced file. (egrep "filename\." didn't find anything)
To me it looks more like a devloper aid than a kernel file. Ok, it
functionality could be replaced by a grep -C, but really delete it?
I believe every kernel developer has grep :-)
Or maybe it could be moved to scripts/ or somewhere?


	Domen

Re: [patch 1/4] delete unused file arch_ppc_kernel_find_name.c

From: Paul Mackerras <hidden>
Date: 2005-03-07 09:13:09

Joerg Dorchain writes:
To me it looks more like a devloper aid than a kernel file. Ok, it
functionality could be replaced by a grep -C, but really delete it?
Last time I looked, grep didn't have the ability to find a string that
isn't in the file.  The address you are searching for might be between
two addresses listed in System.map, in which case find_name.c will
print the symbol corresponding to the lower of the two addresses.  Not
that I use find_name.c myself.  I agree that arch/ppc/kernel is a bad
place for it too.

Paul.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help