aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-07-13 04:37:12 +0000
committerMike Frysinger <vapier@gentoo.org>2007-07-13 04:37:12 +0000
commitd611cccd81c47e9df3f5f51dee8f8ac211d8eb4c (patch)
tree426565e29607f1518d90bd8fc4bbc1f8ab0e5106
parentc540e75d74974ffe89089035cce90dc8e815e9f7 (diff)
downloadbusybox-d611cccd81c47e9df3f5f51dee8f8ac211d8eb4c.tar.gz
add support for --symbol-prefix/-P
-rwxr-xr-xexamples/depmod.pl29
1 files changed, 16 insertions, 13 deletions
diff --git a/examples/depmod.pl b/examples/depmod.pl
index b2bf54713..ca2e8f76d 100755
--- a/examples/depmod.pl
+++ b/examples/depmod.pl
@@ -22,6 +22,7 @@ my $kdir="";
my $basedir="";
my $kernel="";
my $kernelsyms="";
+my $symprefix="";
my $stdout=0;
my $verbose=0;
my $help=0;
@@ -36,22 +37,24 @@ my $mod = {};
my $usage = <<TXT;
$0 -b basedir { -k <vmlinux> | -F <System.map> } [options]...
Where:
- -h --help : Show this help screen
- -b --basedir : Modules base directory (e.g /lib/modules/<2.x.y>)
- -k --kernel : Kernel binary for the target (e.g. vmlinux)
- -F --kernelsyms : Kernel symbol file (e.g. System.map)
- -n --stdout : Write to stdout instead of <basedir>/modules.dep
- -v --verbose : Print out lots of debugging stuff
+ -h --help : Show this help screen
+ -b --basedir : Modules base directory (e.g /lib/modules/<2.x.y>)
+ -k --kernel : Kernel binary for the target (e.g. vmlinux)
+ -F --kernelsyms : Kernel symbol file (e.g. System.map)
+ -n --stdout : Write to stdout instead of <basedir>/modules.dep
+ -v --verbose : Print out lots of debugging stuff
+ -P --symbol-prefix : Symbol prefix
TXT
# get command-line options
GetOptions(
- "help|h" => \$help,
- "basedir|b=s" => \$basedir,
- "kernel|k=s" => \$kernel,
- "kernelsyms|F=s" => \$kernelsyms,
- "stdout|n" => \$stdout,
- "verbose|v" => \$verbose,
+ "help|h" => \$help,
+ "basedir|b=s" => \$basedir,
+ "kernel|k=s" => \$kernel,
+ "kernelsyms|F=s" => \$kernelsyms,
+ "stdout|n" => \$stdout,
+ "verbose|v" => \$verbose,
+ "symbol-prefix|P=s" => \$symprefix,
);
die $usage if $help;
@@ -182,7 +185,7 @@ sub build_ref_tables
}
# this takes makes sure modules with no dependencies get listed
- push @{$dep->{$name}}, 'printk' unless $name eq 'vmlinux';
+ push @{$dep->{$name}}, $symprefix . 'printk' unless $name eq 'vmlinux';
# gather the unresolved symbols
foreach ( @$sym_ar ) {