decode-panic deal with kextload

kextload won't handle -arch. deal appropriately.

Change-Id: Iac7dac9b484e44b9610da028027aadbd94cfe151
Reviewed-on: http://gerrit.openafs.org/1246
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Derrick Brashear 2010-02-05 15:01:31 -05:00 committed by Derrick Brashear
parent 521b3363aa
commit b80efa48f4

View File

@ -305,30 +305,53 @@ sub generate_symbol_files {
my $kernel = shift;
my $kext = shift;
if ($kernel eq "/mach_kernel") {
if ($option_verbose) {
print "$kextprog -k $kernel -s $temp_dir -arch $kextarch -a org.openafs.filesystems.afs\@${kernel_address} -n $kext\n";
if ($kextprog eq $kextload) {
if ($kernel eq "/mach_kernel") {
if ($option_verbose) {
print "$kextprog -k $kernel -s $temp_dir -a org.openafs.filesystems.afs\@${kernel_address} -n $kext\n";
}
system( $kextprog,
"-k", $kernel,
"-s", $temp_dir,
"-a", 'org.openafs.filesystems.afs@' . $kernel_address,
"-n", $kext );
} else {
if ($option_verbose) {
print "$kextprog -c -e -r $temp_dir -k $kernel -s $temp_dir -a org.openafs.filesystems.afs\@${kernel_address} -n $kext\n";
}
system( $kextprog,
"-c", "-e",
"-r", $temp_dir,
"-k", $kernel,
"-s", $temp_dir,
"-a", 'org.openafs.filesystems.afs@' . $kernel_address,
"-n", $kext );
}
system( $kextprog,
"-k", $kernel,
"-s", $temp_dir,
"-arch", $kextarch,
"-a", 'org.openafs.filesystems.afs@' . $kernel_address,
"-n", $kext );
} else {
if ($option_verbose) {
print "$kextprog -c -e -r $temp_dir -k $kernel -s $temp_dir -arch $kextarch -a org.openafs.filesystems.afs\@${kernel_address} -n $kext\n";
if ($kernel eq "/mach_kernel") {
if ($option_verbose) {
print "$kextprog -k $kernel -s $temp_dir -arch $kextarch -a org.openafs.filesystems.afs\@${kernel_address} -n $kext\n";
}
system( $kextprog,
"-k", $kernel,
"-s", $temp_dir,
"-arch", $kextarch,
"-a", 'org.openafs.filesystems.afs@' . $kernel_address,
"-n", $kext );
} else {
if ($option_verbose) {
print "$kextprog -c -e -r $temp_dir -k $kernel -s $temp_dir -arch $kextarch -a org.openafs.filesystems.afs\@${kernel_address} -n $kext\n";
}
system( $kextprog,
"-c", "-e",
"-r", $temp_dir,
"-k", $kernel,
"-s", $temp_dir,
"-arch", $kextarch,
"-a", 'org.openafs.filesystems.afs@' . $kernel_address,
"-n", $kext );
}
system( $kextprog,
"-c", "-e",
"-r", $temp_dir,
"-k", $kernel,
"-s", $temp_dir,
"-arch", $kextarch,
"-a", 'org.openafs.filesystems.afs@' . $kernel_address,
"-n", $kext );
}
if ( $CHILD_ERROR ) {
# error
croak "kextload failed to run: $OS_ERROR\n";