]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afsd-fs-check-20060323
authorDerrick Brashear <shadow@dementia.org>
Thu, 23 Mar 2006 15:35:53 +0000 (15:35 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 23 Mar 2006 15:35:53 +0000 (15:35 +0000)
from debian, modified slightly. tell people why their filesystem sucks

src/afsd/afsd.c

index ab85fffa36ff66bafe1df05775551e7b288bbead..964b66f47573cd3c5563ef08286ba6b17b060c08 100644 (file)
@@ -1074,6 +1074,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
@@ -1741,7 +1745,12 @@ mainproc(struct cmd_syndesc *as, char *arock)
 
     if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)
        && (fsTypeMsg = CheckCacheBaseDir(cacheBaseDir))) {
+#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);