afsd: Detect -dcache presence correctly
[openafs.git] / src / afsd / afsd.c
index 2dcdb49..5fe8b04 100644 (file)
@@ -1735,7 +1735,7 @@ mainproc(struct cmd_syndesc *as, void *arock)
        }
     }
 
-    if (cmd_OptionAsInt(as, OPT_dcache, &dCacheSize))
+    if (cmd_OptionAsInt(as, OPT_dcache, &dCacheSize) == 0)
        sawDCacheSize = 1;
 
     cmd_OptionAsInt(as, OPT_volumes, &vCacheSize);
@@ -2376,13 +2376,13 @@ afsd_run(void)
      * Give the kernel the names of the AFS files cached on the workstation's
      * disk.
      */
-    if (afsd_debug)
-       printf
-           ("%s: Calling AFSOP_CACHEFILE for each of the %d files in '%s'\n",
-            rn, cacheFiles, cacheBaseDir);
     if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) {
-       /* ... and again ... */
        int nocachefile = 0;
+       if (afsd_debug)
+           printf
+               ("%s: Calling AFSOP_CACHEFILE for each of the %d files in '%s'\n",
+                rn, cacheFiles, cacheBaseDir);
+       /* ... and again ... */
        for (currVFile = 0; currVFile < cacheFiles; currVFile++) {
            if (!nocachefile) {
                sprintf(fullpn_VFile, "%s/D%d/V%d", cacheBaseDir, dir_for_V[currVFile], currVFile);