Skip to contentSkip to conversation

delete unused file arch_ppc_kernel_find_name.c

PATCH In review [email protected] 3 participants 4 messages Mar 6, 2005 – Mar 7, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 delete unused file arch_ppc_kernel_find_name.c

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

---

 kj/arch/ppc/kernel/find_name.c |   48 -----------------------------------------
 1 files changed, 48 deletions(-)
arch/ppc/kernel/find_name.c deleted +0 -48
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
@@ -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;
-}

_

#1 lore raw
Quoted 1 line · On Sun, Mar 06, 2005 at 11:22:56PM +0100, [email protected] 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

#2 lore raw
Quoted 5 lines · Joerg Dorchain
Quoted 1 line · On Sun, Mar 06, 2005 at 11:22:56PM +0100, [email protected] 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?

I believe every kernel developer has grep :-) Or maybe it could be moved to scripts/ or somewhere?

Domen

#3 lore raw
In reply to Joerg Dorchain
Quoted 2 lines · Joerg Dorchain

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.