[OpenAFS-devel] 1.3.73 in new cell
Martin MOKREJŠ
mmokrejs@ribosome.natur.cuni.cz
Tue, 30 Nov 2004 14:39:30 +0100
Derrick J Brashear wrote:
> On Fri, 29 Oct 2004, [ISO-8859-2] Martin MOKREJŠ wrote:
>
>> Hi,
>> they were caused by the kernel module not loaded.
>> Could handling of this error be more transparent ===> error
>> messages more descriptive? ;-)
>
>
> Sure, send a patch.
Hi,
I've googled around. People get either error -1 (as I did) or 22.
For the 22 my interpretation isn't clear, as the user fixed
the problem by another pre-compiled package, where "possibly"
version of libafs and afsd vere same ... who knows.
Therefore, I'd propose treating only "-1" error and the rest
with the general error message.
The AFS_component_version_number.c is included actually later in the
source again. Probably the second inclusion should be removed ...
I've never written anything in C yet, so double-check yourself,
so this inclusion is up to you.
However, it compiles and works for me. ;)
--- ./src/afsd/afsd.c.ori 2004-11-30 14:23:56.000000000 +0100
+++ ./src/afsd/afsd.c 2004-11-30 14:30:14.000000000 +0100
@@ -1601,9 +1601,15 @@
}
#endif
+#include "AFS_component_version_number.c"
code = call_syscall(AFSOP_BASIC_INIT, 1);
if (code)
- printf("%s: Error %d in basic initialization.\n", rn, code);
+ if (code == -1) {
+ printf("%s: Error %d in basic initialization. Typically, when kernel module of version %s is not loaded.\n", rn, code, AFSVersion);
+ } else {
+ printf("%s: Error %d in basic initialization. Maybe kernel module of version %s is not loaded?\n", rn, code, AFSVersion);
+ }
+ exit(1);
/*
* Tell the kernel some basic information about the workstation's cache.