linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/4] delete unused file arch_ppc_kernel_find_name.c
@ 2005-03-06 22:22 domen
  2005-03-07  7:37 ` Joerg Dorchain
  0 siblings, 1 reply; 4+ messages in thread
From: domen @ 2005-03-06 22:22 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev, domen


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

Signed-off-by: Domen Puncer <domen@coderock.org>
---


 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;
-}
_

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 1/4] delete unused file arch_ppc_kernel_find_name.c
  2005-03-06 22:22 [patch 1/4] delete unused file arch_ppc_kernel_find_name.c domen
@ 2005-03-07  7:37 ` Joerg Dorchain
  2005-03-07  8:25   ` Domen Puncer
  2005-03-07  9:13   ` Paul Mackerras
  0 siblings, 2 replies; 4+ messages in thread
From: Joerg Dorchain @ 2005-03-07  7:37 UTC (permalink / raw)
  To: domen; +Cc: linuxppc-dev, paulus

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 1/4] delete unused file arch_ppc_kernel_find_name.c
  2005-03-07  7:37 ` Joerg Dorchain
@ 2005-03-07  8:25   ` Domen Puncer
  2005-03-07  9:13   ` Paul Mackerras
  1 sibling, 0 replies; 4+ messages in thread
From: Domen Puncer @ 2005-03-07  8:25 UTC (permalink / raw)
  To: Joerg Dorchain; +Cc: linuxppc-dev, paulus

On 07/03/05 08:37 +0100, Joerg Dorchain wrote:
> 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?

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


	Domen

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 1/4] delete unused file arch_ppc_kernel_find_name.c
  2005-03-07  7:37 ` Joerg Dorchain
  2005-03-07  8:25   ` Domen Puncer
@ 2005-03-07  9:13   ` Paul Mackerras
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Mackerras @ 2005-03-07  9:13 UTC (permalink / raw)
  To: Joerg Dorchain; +Cc: linuxppc-dev, domen

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-07  9:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-06 22:22 [patch 1/4] delete unused file arch_ppc_kernel_find_name.c domen
2005-03-07  7:37 ` Joerg Dorchain
2005-03-07  8:25   ` Domen Puncer
2005-03-07  9:13   ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).