Use com_err to return a sensible string, rather than just an error code,
for errors with Ubik initialisation.
This has the specific benefit that the error when the database directory
doesn't exist, or isn't readable, becomes
Ubik init failed: file not found when processing dbase"
rather than
Ubik init failed with code 5382
Change-Id: I5f770377668a7f545cad7e422f28afd7c9f9888d
Reviewed-on: http://gerrit.openafs.org/2735
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
6380213d296c138349c77fa4a51655fac23cfeea)
Reviewed-on: http://gerrit.openafs.org/2790
#include <afs/keys.h>
#include <afs/auth.h>
#include <afs/audit.h>
+#include <afs/com_err.h>
#include <lock.h>
#include <ubik.h>
#include <afs/afsutil.h>
ubik_ServerInitByInfo(myHost, htons(AFSCONF_VLDBPORT), &info, clones,
vl_dbaseName, &VL_dbase);
if (code) {
- printf("vlserver: Ubik init failed with code %d\n", code);
+ printf("vlserver: Ubik init failed: %s\n", afs_error_message(code));
exit(2);
}
if (!rxJumbograms) {