From b80efa48f48ddfafe0ad2bdb9d00b6774de17357 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Fri, 5 Feb 2010 15:01:31 -0500 Subject: [PATCH] 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 Tested-by: Derrick Brashear --- src/packaging/MacOS/decode-panic | 65 +++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/src/packaging/MacOS/decode-panic b/src/packaging/MacOS/decode-panic index cd7c874f99..42fc1bd2e8 100755 --- a/src/packaging/MacOS/decode-panic +++ b/src/packaging/MacOS/decode-panic @@ -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";