#include <afsconfig.h>
#include <afs/param.h>
-RCSID
- ("$Header$");
+#include <roken.h>
+
+#include <ctype.h>
-#include <stdio.h>
#define VICE
#if defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV)
#endif
#define DKTYPENAMES
-#include <sys/param.h>
-#include <sys/time.h>
#ifdef AFS_OSF_ENV
#include <sys/vnode.h>
#include <ufs/dir.h>
#undef _KERNEL
#undef _BSD
-#include <stdio.h>
#else /* AFS_OSF_ENV */
#ifdef AFS_VFSINCL_ENV
#include <sys/vnode.h>
#ifdef AFS_SUN5_ENV
-#include <stdio.h>
-#include <unistd.h>
#include <sys/fs/ufs_inode.h>
#include <sys/fs/ufs_fs.h>
#define _KERNEL
#else /* AFS_VFSINCL_ENV */
#include <sys/inode.h>
#ifdef AFS_HPUX_ENV
-#include <ctype.h>
#define LONGFILENAMES 1
#include <sys/sysmacros.h>
#include <sys/ino.h>
#endif /* AFS_VFSINCL_ENV */
#endif /* AFS_OSF_ENV */
-#include <sys/stat.h>
-#include <sys/ioctl.h>
#include <sys/file.h>
-#include <ctype.h>
#ifdef AFS_SUN5_ENV
#include <sys/mntent.h>
#include <sys/vfstab.h>
/*
* The size of a cylinder group is calculated by CGSIZE. The maximum size
* is limited by the fact that cylinder groups are at most one block.
- * Its size is derived from the size of the maps maintained in the
+ * Its size is derived from the size of the maps maintained in the
* cylinder group and the (struct cg) size.
*/
#define CGSIZE(fs) \
/* inode map */ howmany((fs)->fs_ipg, NBBY) + \
/* block map */ howmany((fs)->fs_cpg * (fs)->fs_spc / NSPF(fs), NBBY))
-char *malloc(), *calloc();
struct disklabel *getdisklabel();
setup(dev)
mlk_pbp = 0;
pbp = 0;
mlk_startinum = 0;
-#ifdef AFS_DEC_ENV
- iscorrupt = 0;
-#endif
#if defined(ACLS) && defined(AFS_HPUX_ENV)
n_cont = 0;
#endif
* The rules are:
* 1) if nflag is set, it's pretty safe to fsck the target dev
* 2) if the target device is a swap, exit
- * 3) if hotroot is set, and "-F" is not specified prompt the
+ * 3) if hotroot is set, and "-F" is not specified prompt the
* user and wait for reply
* 4) if the target is a mounted file system, and "-F" is not
* specified, prompt the user and wait for reply
sbdirty();
}
}
-#ifdef AFS_DEC_ENV
- /*
- * If '-p' is used and the partition was cleanly unmounted last time then skip the
- * fscking process
- */
- if (only_when_needed && (sblock.fs_clean == FS_CLEAN)
- && clean_byte_valid(sblock.fs_lastfsck)) {
- msgprintf("%s: umounted cleanly\n", dev);
- return (FS_CLEAN);
- }
-#endif
#ifdef AFS_HPUX_ENV
/*
* Do we need to continue ?
memcpy((char *)altsblock.fs_sparecon, (char *)sblock.fs_sparecon,
sizeof sblock.fs_sparecon);
#endif
-#if defined(AFS_DEC_ENV)
- memcpy((char *)altsblock.fs_extra, (char *)sblock.fs_extra,
- sizeof sblock.fs_extra);
- altsblock.fs_deftimer = sblock.fs_deftimer;
- altsblock.fs_lastfsck = sblock.fs_lastfsck;
- altsblock.fs_gennum = sblock.fs_gennum;
-#endif
/*
* The following should not have to be copied.
*/
if (memcmp
((char *)&sblock.fs_blank[0], (char *)&altsblock.fs_blank[0],
MAXCSBUFS * sizeof(int))) {
- memset((char *)sblock.fs_blank, 0, sizeof(sblock.fs_blank));
+ memset(sblock.fs_blank, 0, sizeof(sblock.fs_blank));
} else {
#endif /* __alpha */
badsb(listerr,
calcsb(dev, devfd, fs)
char *dev;
int devfd;
- register struct fs *fs;
+ struct fs *fs;
{
return 0;
}
-#ifdef AFS_DEC_ENV
-clean_byte_valid(lastfsck)
- time_t lastfsck;
-{
- time_t now;
- int delta;
-
- time(&now);
- if ((!sblock.fs_deftimer) || (!sblock.fs_lastfsck) || (lastfsck > now)) {
- sblock.fs_deftimer = 0;
- return (0);
- }
- if (!sblock.fs_cleantimer)
- return (0);
- delta = (now - lastfsck) / 86400;
- if (delta > 60)
- return (0);
- return (1);
-}
-#endif
-
#include <sys/ustat.h>
#ifdef AFS_HPUX_ENV
#include <sys/pstat.h>
dev_t devno;
{
struct pst_swapinfo pst[PS_BURST];
- register struct pst_swapinfo *psp = &pst[0];
+ struct pst_swapinfo *psp = &pst[0];
int idx = 0, count, match = 0;
while ((count = PSTAT(psp, PS_BURST, idx) != 0)) {
FILE *fp;
char *loc;
{
- register n;
- register char *p, *lastloc;
+ int n;
+ char *p, *lastloc;
p = loc;
lastloc = &p[maxlen - 1];
#if defined(AFS_HPUX110_ENV)
/*
- * Refer to function compare_sblocks() in HP's fsck.c
+ * Refer to function compare_sblocks() in HP's fsck.c
*
* DESCRIPTION:
* This routine will compare the primary superblock (PRIM_SBLOCK) to the