From: Derrick Brashear Date: Thu, 23 Mar 2006 15:40:10 +0000 (+0000) Subject: STABLE14-afsd-fs-check-20060323 X-Git-Tag: openafs-stable-1_4_1~28 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0d37c854c664f8038c39e872f8380b071f53c13e;p=packages%2Fo%2Fopenafs.git STABLE14-afsd-fs-check-20060323 from debian, modified slightly. tell people why their filesystem sucks (cherry picked from commit a1041136186dba50f035ddc9b97fbfb86469b504) --- diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index 82b823f17..03e77408d 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -1069,6 +1069,10 @@ CheckCacheBaseDir(char *dir) return "cannot use reiserfs as cache partition"; } else if (statfsbuf.f_type == 0x58465342) { /* XFS_SUPER_MAGIC */ return "cannot use xfs as cache partition"; + } else if (statfsbuf.f_type == 0x01021994) { /* TMPFS_SUPER_MAGIC */ + return "cannot use tmpfs as cache partition"; + } else if (statfsbuf.f_type != 0xEF53) { + return "must use ext2 or ext3 for cache partition"; } } #endif @@ -1719,7 +1723,12 @@ mainproc(struct cmd_syndesc *as, char *arock) vFilePtr = fullpn_VFile + strlen(fullpn_VFile); if (!(cacheFlags & AFSCALL_INIT_MEMCACHE) && (fsTypeMsg = CheckCacheBaseDir(cacheBaseDir))) { - printf("%s: WARNING: Cache dir check failed (%s)\n", rn, fsTypeMsg); +#ifdef AFS_SUN5_ENV + printf("%s: WARNING: Cache dir check failed (%s)\n", rn, fsTypeMsg); +#else + printf("%s: ERROR: Cache dir check failed (%s)\n", rn, fsTypeMsg); + exit(1); +#endif } #if 0 fputs(AFS_GOVERNMENT_MESSAGE, stdout);