tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
if (!tdir) {
- printf
+ VLog(0,
("vlserver: can't open configuration files in dir %s, giving up.\n",
- AFSDIR_SERVER_ETC_DIRPATH);
+ AFSDIR_SERVER_ETC_DIRPATH));
exit(1);
}
#ifdef AFS_NT40_ENV
/* initialize winsock */
if (afs_winsockInit() < 0) {
ReportErrorEventAlt(AFSEVT_SVR_WINSOCK_INIT_FAILED, 0, argv[0], 0);
- fprintf(stderr, "vlserver: couldn't initialize winsock. \n");
+ VLog(0, ("vlserver: couldn't initialize winsock.\n"));
exit(1);
}
#endif
gethostname(hostname, sizeof(hostname));
th = gethostbyname(hostname);
if (!th) {
- printf("vlserver: couldn't get address of this host (%s).\n",
- hostname);
+ VLog(0, ("vlserver: couldn't get address of this host (%s).\n",
+ hostname));
exit(1);
}
memcpy(&myHost, th->h_addr, sizeof(afs_uint32));
afsconf_GetExtendedCellInfo(tdir, NULL, AFSCONF_VLDBSERVICE, &info,
clones);
if (code) {
- printf("vlserver: Couldn't get cell server list for 'afsvldb'.\n");
+ VLog(0, ("vlserver: Couldn't get cell server list for 'afsvldb'.\n"));
exit(2);
}
securityClasses, numClasses,
RXSTATS_ExecuteRequest);
if (tservice == (struct rx_service *)0) {
- printf("vlserver: Could not create rpc stats rx service\n");
+ VLog(0, ("vlserver: Could not create rpc stats rx service\n"));
exit(3);
}
rx_SetMinProcs(tservice, 2);
/* 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 */
memset(&cheader, 0, sizeof(cheader));
}
code = vlwrite(trans, 0, (char *)&cheader, sizeof(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(cheader.vital_header.vldbversion);
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);
+ vldbversion, VLDBVERSION_4, VLDBVERSION, OVLDBVERSION));
return VL_BADVERSION;
}