bin/80499: making brandelf more inteligent

Divacky Roman xdivac02 at stud.fit.vutbr.cz
Sun May 1 01:10:02 PDT 2005


>Number:         80499
>Category:       bin
>Synopsis:       making brandelf more inteligent
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 01 08:10:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Divacky Roman
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
FreeBSD witten 6.0-CURRENT FreeBSD 6.0-CURRENT #307: Wed Apr 27 17:30:33 CEST
2005     root at witten:/usr/obj/usr/src/sys/NEOLOGISM  i386


	
>Description:

Brandelf is a bit braindead cause it doesnt accept brandelf -t linux etc.
because it compares the string case sensitively.. I think this is a nonsense
and should be done case insensitively.

>How-To-Repeat:
apply the patch
>Fix:

? brandelf.patch
Index: brandelf.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/brandelf/brandelf.c,v
retrieving revision 1.23
diff -u -r1.23 brandelf.c
--- brandelf.c	2 Jun 2002 20:05:57 -0000	1.23
+++ brandelf.c	14 Apr 2005 15:38:07 -0000
@@ -189,7 +189,7 @@
 	for (elfwalk = 0;
 	     elfwalk < sizeof(elftypes)/sizeof(elftypes[0]);
 	     elfwalk++)
-		if (strcmp(elfstrtype, elftypes[elfwalk].str) == 0)
+		if (strcasecmp(elfstrtype, elftypes[elfwalk].str) == 0)
 			return elftypes[elfwalk].value;
 	return -1;
 }
	


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list