/* now, if can't read, or header is wrong, write a new header */
if (ubcode || vldbversion == 0) {
if (builddb) {
- printf("Can't read VLDB header, re-initialising...\n");
+ VLog(0, ("Can't read VLDB header, re-initialising...\n"));
/* try to write a good header */
/* The read cache will be sync'ed to this new header
}
code = vlwrite(trans, 0, (char *)&wr_cheader, sizeof(wr_cheader));
if (code) {
- printf("Can't write VLDB header (error = %d)\n", code);
+ VLog(0, ("Can't write VLDB header (error = %d)\n", code));
ERROR_EXIT(VL_IO);
}
vldbversion = ntohl(wr_cheader.vital_header.vldbversion);
} else {
+ VLog(1, ("Unable to read VLDB header.\n"));
ERROR_EXIT(VL_EMPTY);
}
}
if ((vldbversion != VLDBVERSION) && (vldbversion != OVLDBVERSION)
&& (vldbversion != VLDBVERSION_4)) {
- printf
+ VLog(0,
("VLDB version %d doesn't match this software version(%d, %d or %d), quitting!\n",
- vldbversion, VLDBVERSION_4, VLDBVERSION, OVLDBVERSION);
- return VL_BADVERSION;
+ vldbversion, VLDBVERSION_4, VLDBVERSION, OVLDBVERSION));
+ ERROR_EXIT(VL_BADVERSION);
}
maxnservers = ((vldbversion == 3 || vldbversion == 4) ? 13 : 8);