svn commit: trunk/busybox: coreutils scripts
aldot at busybox.net
aldot at busybox.net
Fri May 23 12:53:19 UTC 2008
Author: aldot
Date: 2008-05-23 05:53:18 -0700 (Fri, 23 May 2008)
New Revision: 22061
Log:
- optionally pass additional flags down to nm
Modified:
trunk/busybox/coreutils/false.c
trunk/busybox/scripts/bloat-o-meter
Changeset:
Modified: trunk/busybox/coreutils/false.c
===================================================================
--- trunk/busybox/coreutils/false.c 2008-05-22 22:05:55 UTC (rev 22060)
+++ trunk/busybox/coreutils/false.c 2008-05-23 12:53:18 UTC (rev 22061)
@@ -8,7 +8,7 @@
*/
/* BB_AUDIT SUSv3 compliant */
-/* http://www.opengroup.org/onlinepubs/007904975/utilities/false.html */
+/* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */
#include "libbb.h"
Modified: trunk/busybox/scripts/bloat-o-meter
===================================================================
--- trunk/busybox/scripts/bloat-o-meter 2008-05-22 22:05:55 UTC (rev 22060)
+++ trunk/busybox/scripts/bloat-o-meter 2008-05-23 12:53:18 UTC (rev 22061)
@@ -9,24 +9,29 @@
import sys, os, re
-if len(sys.argv) != 3:
+def usage():
sys.stderr.write("usage: %s file1 file2\n" % sys.argv[0])
sys.exit(-1)
+if len(sys.argv) < 3:
+ usage()
+
for f in sys.argv[1], sys.argv[2]:
if not os.path.exists(f):
sys.stderr.write("Error: file '%s' does not exist\n" % f)
- sys.exit(-1)
+ usage()
+nm_args = " ".join([x for x in sys.argv[3:]])
def getsizes(file):
sym = {}
- for l in os.popen("nm --size-sort " + file).readlines():
+ for l in os.popen("nm --size-sort %s %s" % (nm_args, file)).readlines():
+ l = l.strip()
# Skip empty lines
- if not len(l.strip()): continue
+ if not len(l): continue
# Skip archive members
if len(l.split()) == 1 and l.endswith(':'):
continue
- size, type, name = l[:-1].split()
+ size, type, name = l.split()
if type in "tTdDbBrR":
if "." in name: name = "static." + name.split(".")[0]
sym[name] = sym.get(name, 0) + int(size, 16)
More information about the busybox-cvs
mailing list