From: Russ Allbery Date: Sat, 15 Oct 2005 16:23:39 +0000 (+0000) Subject: STABLE14-afsd-no-logfile-20051015 X-Git-Tag: openafs-stable-1_4_1-rc1~21 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6f0d7875468b7a6ff047d75bce654bae5c5de167;p=packages%2Fo%2Fopenafs.git STABLE14-afsd-no-logfile-20051015 FIXES 18662 remove afsd logfile parm (cherry picked from commit 2699810c91aa883c51535e05f86c30bd7b665c2b) --- diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index 0ff7fa8fd..38a0dd5c5 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -47,7 +47,8 @@ * system problems, which can only be ameliorated by changing * NINODE (or equivalent) and rebuilding the kernel. * This option is now disabled. - * -logfile Place where to put the logfile (default in /etc/AFSLog. + * -logfile [OBSOLETE] Place where to put the logfile (default in + * /etc/AFSLog. * -waitclose make close calls always synchronous (slows em down, tho) * -files_per_subdir [n] number of files per cache subdir. (def=2048) * -shutdown Shutdown afs daemons @@ -188,7 +189,6 @@ kern_return_t DiskArbDiskAppearedWithMountpointPing_auto(char *, unsigned int, #define CACHEINFOFILE "cacheinfo" -#define AFSLOGFILE "AFSLog" #define DCACHEFILE "CacheItems" #define VOLINFOFILE "VolumeItems" #define CELLINFOFILE "CellItems" @@ -240,7 +240,6 @@ char confDir[1024]; /*Where the workstation AFS configuration lives */ char fullpn_DCacheFile[1024]; /*Full pathname of DCACHEFILE */ char fullpn_VolInfoFile[1024]; /*Full pathname of VOLINFOFILE */ char fullpn_CellInfoFile[1024]; /*Full pathanem of CELLINFOFILE */ -char fullpn_AFSLogFile[1024]; /*Full pathname of AFSLOGFILE */ char fullpn_CacheInfo[1024]; /*Full pathname of CACHEINFO */ char fullpn_VFile[1024]; /*Full pathname of data cache files */ char *vFilePtr; /*Ptr to the number part of above pathname */ @@ -1433,10 +1432,9 @@ mainproc(struct cmd_syndesc *as, char *arock) strcpy(confDir, as->parms[17].items->data); } sprintf(fullpn_CacheInfo, "%s/%s", confDir, CACHEINFOFILE); - sprintf(fullpn_AFSLogFile, "%s/%s", confDir, AFSLOGFILE); if (as->parms[18].items) { /* -logfile */ - strcpy(fullpn_AFSLogFile, as->parms[18].items->data); + printf("afsd: Ignoring obsolete -logfile flag\n"); } if (as->parms[19].items) { /* -waitclose */ @@ -1553,18 +1551,6 @@ mainproc(struct cmd_syndesc *as, char *arock) exit(1); } - if ((logfd = fopen(fullpn_AFSLogFile, "r+")) == 0) { - if (afsd_verbose) - printf("%s: Creating '%s'\n", rn, fullpn_AFSLogFile); - if (CreateCacheFile(fullpn_AFSLogFile, NULL)) { - printf - ("%s: Can't create '%s' (You may want to use the -logfile option)\n", - rn, fullpn_AFSLogFile); - exit(1); - } - } else - fclose(logfd); - /* do some random computations in memcache case to get things to work * reasonably no matter which parameters you set. */ @@ -2035,21 +2021,6 @@ mainproc(struct cmd_syndesc *as, char *arock) if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) call_syscall(AFSOP_VOLUMEINFO, fullpn_VolInfoFile); - /* - * Pass the kernel the name of the afs logging file holding the volume - * information. - */ - if (afsd_debug) - printf("%s: Calling AFSOP_AFSLOG: volume info file is '%s'\n", rn, - fullpn_AFSLogFile); -#if defined(AFS_SGI_ENV) - /* permit explicit -logfile argument to enable logging on memcache systems */ - if (!(cacheFlags & AFSCALL_INIT_MEMCACHE) || as->parms[18].items) -#else - if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) /* ... nor this ... */ -#endif - call_syscall(AFSOP_AFSLOG, fullpn_AFSLogFile); - /* * Give the kernel the names of the AFS files cached on the workstation's * disk.