#include <afsconfig.h>
#include <afs/param.h>
+#include <roken.h>
+
+#include <ctype.h>
-#include <stdio.h>
-#include <string.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)
* 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
* read in the summary info.
*/
asked = 0;
-#if defined(AFS_SUN56_ENV)
+#if defined(AFS_SUN5_ENV)
{
caddr_t sip;
sip = calloc(1, sblock.fs_cssize);
sip += size;
}
}
-#else /* AFS_SUN56_ENV */
+#else /* AFS_SUN5_ENV */
#if defined(AFS_HPUX110_ENV)
size = fragroundup(&sblock, sblock.fs_cssize);
- sblock.fs_csp = (struct csum *)calloc(1, (unsigned)size);
+ sblock.fs_csp = calloc(1, (unsigned)size);
if ((bread
(fsreadfd, (char *)sblock.fs_csp, fsbtodb(&sblock, sblock.fs_csaddr),
size) != 0) && !asked) {
sblock.fs_cssize - i <
sblock.fs_bsize ? sblock.fs_cssize - i : sblock.fs_bsize;
#endif /* AFS_HPUX101_ENV */
- sblock.fs_csp[j] = (struct csum *)calloc(1, (unsigned)size);
+ sblock.fs_csp[j] = calloc(1, (unsigned)size);
if (bread
(fsreadfd, (char *)sblock.fs_csp[j],
fsbtodb(&sblock, sblock.fs_csaddr + j * sblock.fs_frag),
}
}
#endif /* else AFS_HPUX110_ENV */
-#endif /* else AFS_SUN56_ENV */
+#endif /* else AFS_SUN5_ENV */
#if defined(AFS_SUN_ENV) && !defined(AFS_SUN3_ENV)
/*
msgprintf("cannot alloc %d bytes for statemap\n", maxino + 1);
goto badsb;
}
- lncntp = (short *)calloc((unsigned)(maxino + 1), sizeof(short));
+ lncntp = calloc((unsigned)(maxino + 1), sizeof(short));
if (lncntp == NULL) {
msgprintf("cannot alloc %d bytes for lncntp\n",
(maxino + 1) * sizeof(short));
altsblock.fs_optim = sblock.fs_optim;
altsblock.fs_rotdelay = sblock.fs_rotdelay;
altsblock.fs_maxbpg = sblock.fs_maxbpg;
-#if !defined(__alpha) && !defined(AFS_SUN56_ENV)
+#if !defined(__alpha) && !defined(AFS_SUN5_ENV)
#if !defined(AFS_HPUX110_ENV)
/* HPUX110 will use UpdateAlternateSuper() below */
memcpy((char *)altsblock.fs_csp, (char *)sblock.fs_csp,
sizeof sblock.fs_csp);
#endif /* ! AFS_HPUX110_ENV */
#endif /* ! __alpha */
-#if defined(AFS_SUN56_ENV)
+#if defined(AFS_SUN5_ENV)
memcpy((char *)altsblock.fs_u.fs_csp_pad, (char *)sblock.fs_u.fs_csp_pad,
sizeof(sblock.fs_u.fs_csp_pad));
#endif
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;
}
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