[OpenAFS-devel] Problem with "afsmodname"

Carsten Jacobi carsten@ccac.rwth-aachen.de
Tue, 30 Oct 2001 13:54:28 +0100


"afsmodname" is returning the name of the uniprocessor module on my
SMP machine. I wondered why he was crashing all the time until I found
out that he just loads the wrong module!
So, here is my patch suggestion for /usr/vice/etc/afsmodname:


--- afsmodname.orig	Mon Oct 29 20:03:33 2001
+++ afsmodname	Mon Oct 29 20:02:39 2001
@@ -111,7 +111,7 @@
 
 ## MAIN PROGRAM
 
-my($cpu, $fpu, $module);
+my($cpu, $fpu, $module, $whether_smp);
 
 if ($ARGV[0] eq '-d') {
   $DEBUG = 1;
@@ -124,7 +124,15 @@
 
 $module = table_lookup($cpu, "$modbase/SymTable", "$modbase/SymTable.local");
 
+$whether_smp = `uname -v`;
+if ($whether_smp =~ /^\#[0-9]+ *(SMP).*$/) { $whether_smp = $1 };
+
 if ($module) {
+  if ( $whether_smp == "SMP" )
+  {
+  	print "libafs-$module.mp.o";
+	exit(0);
+  }
   print "libafs-$module.o";
   exit(0);
 }

 So what do you think?

 Carsten Jacobi