#define AFS_VOLCHECK_MTPTS 0x4 /* mount point invalidation also */
#define AFS_VOLCHECK_FORCE 0x8 /* do all forcibly */
-/* For volume ttl expiry checks. */
-#define AFS_MIN_VOLUME_TTL 600
-#define AFS_MAX_VOLUME_TTL MAX_AFS_INT32
-
#endif /* KERNEL */
#define AFS_FSPORT ((unsigned short) htons(7000))
if (afsd_verbose)
printf("%s: Calling AFSOP_SET_VOLUME_TTL with '%d'\n", rn, volume_ttl);
code = afsd_syscall(AFSOP_SET_VOLUME_TTL, volume_ttl);
- if (code != 0)
- printf("%s: Error setting volume ttl to %d seconds; code=%d.\n", rn, volume_ttl, code);
+ if (code == EFAULT) {
+ if (volume_ttl < AFS_MIN_VOLUME_TTL)
+ printf("%s: Failed to set volume ttl to %d seconds; "
+ "value is too low.\n", rn, volume_ttl);
+ else if (volume_ttl > AFS_MAX_VOLUME_TTL)
+ printf("%s: Failed to set volume ttl to %d seconds; "
+ "value is too high.\n", rn, volume_ttl);
+ else
+ printf("%s: Failed to set volume ttl to %d seconds; "
+ "value is out of range.\n", rn, volume_ttl);
+ } else if (code != 0) {
+ printf("%s: Failed to set volume ttl to %d seconds; "
+ "code=%d.\n", rn, volume_ttl, code);
+ }
}
/*
AFS_INUMCALC_MD5 = 1
};
+/* Supported volume ttl range. */
+#define AFS_MIN_VOLUME_TTL 600
+#define AFS_MAX_VOLUME_TTL MAX_AFS_INT32
/*
* Note that the AFS_*ALLOCSIZ values should be multiples of sizeof(void*) to