afsd-bitch-about-xfs-not-about-dir-for-memcache-20040708

FIXES 5728

make afsd complain if cache partition is linux
don't complain if no cachedir and we're -memcache.
This commit is contained in:
Rainer Schöpf 2004-07-08 05:52:38 +00:00 committed by Derrick Brashear
parent cccb91291f
commit 85a973a7b9

View File

@ -1049,6 +1049,8 @@ CheckCacheBaseDir(char *dir)
}
if (statfsbuf.f_type == 0x52654973) { /* REISERFS_SUPER_MAGIC */
return "cannot use reiserfs as cache partition";
} else if (statfsbuf.f_type == 0x58465342) { /* XFS_SUPER_MAGIC */
return "cannot use xfs as cache partition";
}
}
#endif
@ -1638,7 +1640,7 @@ mainproc(as, arock)
sprintf(fullpn_VFile, "%s/", cacheBaseDir);
vFilePtr = fullpn_VFile + strlen(fullpn_VFile);
if ((fsTypeMsg = CheckCacheBaseDir(cacheBaseDir))) {
if (!(cacheFlags & AFSCALL_INIT_MEMCACHE) && (fsTypeMsg = CheckCacheBaseDir(cacheBaseDir))) {
printf("%s: WARNING: Cache dir check failed (%s)\n", rn, fsTypeMsg);
}
#if 0