mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
Remove DUX/OSF code
Remove code for DUX/OSF platforms. DUX code was removed from the libafs client in commit392dcf67
("Complete removal of DUX client code") and the alpha_dux* param files were removed indc4d9d64
("afs: Remove AFS_BOZONLOCK_ENV"). This code has always been disabled since those commits, so remove any code referencing AFS_DUX*_ENV, AFS_OSF_ENV, and related symbols. Change-Id: I3787b83c80a48e53fe214fdecf9a9ac0b63d390c Reviewed-on: https://gerrit.openafs.org/13260 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
8ad4e15ffc
commit
6534b10a41
@ -72,8 +72,6 @@ AIX: afs_aixops.c -> osi_vnodeops.c
|
||||
aix_vfs.h -> osi_vfs.h
|
||||
misc.s -> osi_assem.s
|
||||
|
||||
DUX: afs_vnodeops.c -> osi_vnodeops.c (DUX specific code)
|
||||
|
||||
HPUX: afs_vnodeops.c -> osi_vnodeops.c (HPUX specific code)
|
||||
afs_hp_debug.c -> osi_debug.c
|
||||
hpux_proc_private.h -> osi_proc_private.h
|
||||
|
@ -82,23 +82,6 @@
|
||||
#include <arpa/inet.h>
|
||||
#endif /* AFS_USR_HPUX_ENV */
|
||||
|
||||
#ifdef AFS_USR_OSF_ENV
|
||||
#ifdef KERNEL
|
||||
#undef KERNEL
|
||||
#define AFS_USR_UNDEF_KERNEL_ENV 1
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif /* AFS_USR_OSF_ENV */
|
||||
|
||||
#ifdef AFS_USR_LINUX22_ENV
|
||||
#include <sys/ioctl.h> /* _IOW() */
|
||||
#include <sys/uio.h> /* struct iovec */
|
||||
@ -256,11 +239,7 @@ typedef unsigned int fsblkcnt_t;
|
||||
|
||||
enum usr_vcexcl { usr_NONEXCL, usr_EXCL };
|
||||
typedef long offset_t;
|
||||
#ifdef AFS_USR_OSF_ENV
|
||||
typedef int usr_ino_t;
|
||||
#else /* AFS_USR_OSF_ENV */
|
||||
typedef long usr_ino_t;
|
||||
#endif /* AFS_USR_OSF_ENV */
|
||||
|
||||
#if defined(AFS_USR_AIX_ENV) || defined(AFS_USR_SGI_ENV)
|
||||
#define SYS_setgroups 101
|
||||
@ -1242,11 +1221,7 @@ extern struct usr_in_ifaddr *usr_in_ifaddr;
|
||||
#endif /* UKERNEL */
|
||||
|
||||
struct min_direct {
|
||||
#if defined(AFS_USR_OSF_ENV)
|
||||
unsigned int d_fileno;
|
||||
#else /* AFS_OFS_ENV || AFS_USR_OSF_ENV */
|
||||
unsigned long d_fileno;
|
||||
#endif /* AFS_OFS_ENV || AFS_USR_OSF_ENV */
|
||||
unsigned short d_reclen;
|
||||
unsigned short d_namlen;
|
||||
};
|
||||
|
@ -1133,12 +1133,6 @@ doSweepAFSCache(int *vFilesFound,
|
||||
SetNoBackupAttr(fullpn_CellInfoFile);
|
||||
} else if ((strcmp(currp->d_name, ".") == 0)
|
||||
|| (strcmp(currp->d_name, "..") == 0) ||
|
||||
#ifdef AFS_DECOSF_ENV
|
||||
/* these are magic AdvFS files */
|
||||
(strcmp(currp->d_name, ".tags") == 0)
|
||||
|| (strcmp(currp->d_name, "quota.user") == 0)
|
||||
|| (strcmp(currp->d_name, "quota.group") == 0) ||
|
||||
#endif
|
||||
#ifdef AFS_LINUX22_ENV
|
||||
/* this is the ext3 journal file */
|
||||
(strcmp(currp->d_name, ".journal") == 0) ||
|
||||
|
@ -214,11 +214,7 @@ afsconf_FindService(const char *aname)
|
||||
if (aname == NULL || aname[0] == '\0')
|
||||
return -1;
|
||||
|
||||
#if defined(AFS_OSF_ENV)
|
||||
ts = getservbyname(aname, "");
|
||||
#else
|
||||
ts = (struct servent *) getservbyname(aname, NULL);
|
||||
#endif
|
||||
if (ts) {
|
||||
/* we found it in /etc/services, so we use this value */
|
||||
return ts->s_port; /* already in network byte order */
|
||||
|
@ -118,9 +118,7 @@ int afs_tf_dest_tkt(void);
|
||||
static void ktc_LocalCell(void);
|
||||
#endif /* AFS_KERBEROS_ENV */
|
||||
|
||||
#ifdef AFS_DUX40_ENV
|
||||
#define PIOCTL afs_pioctl
|
||||
#elif defined(UKERNEL)
|
||||
#if defined(UKERNEL)
|
||||
#define PIOCTL(A,B,C,D) (errno = (call_syscall(AFSCALL_PIOCTL,A,B,C,D)), errno?-1:0)
|
||||
#else
|
||||
#define PIOCTL pioctl
|
||||
|
@ -198,15 +198,6 @@ else
|
||||
i386-pc-solaris2.11)
|
||||
AFS_SYSNAME="sunx86_511"
|
||||
;;
|
||||
alpha*-dec-osf4.0*)
|
||||
AFS_SYSNAME="alpha_dux40"
|
||||
;;
|
||||
alpha*-dec-osf5.0*)
|
||||
AFS_SYSNAME="alpha_dux50"
|
||||
;;
|
||||
alpha*-dec-osf5.1*)
|
||||
AFS_SYSNAME="alpha_dux51"
|
||||
;;
|
||||
mips-sgi-irix6.5)
|
||||
AFS_SYSNAME="sgi_65"
|
||||
enable_pam="no"
|
||||
|
@ -38,11 +38,6 @@
|
||||
# include "h/user.h"
|
||||
# endif /* AFS_SGI64_ENV */
|
||||
# include "h/uio.h"
|
||||
# ifdef AFS_OSF_ENV
|
||||
# include <sys/mount.h>
|
||||
# include <sys/vnode.h>
|
||||
# include <ufs/inode.h>
|
||||
# endif
|
||||
# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
|
||||
# include "h/mbuf.h"
|
||||
# endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
#if defined(AFS_NBSD50_ENV)
|
||||
#include "afs/afs_osi.h"
|
||||
#endif
|
||||
#if defined(AFS_OSF_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
|
||||
#if defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
|
||||
#include "afs/sysincludes.h"
|
||||
#include "afsincludes.h"
|
||||
#else
|
||||
|
@ -20,11 +20,6 @@
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
/* On DUX "IN" is a variable in curses.h, so this can be a bit of a problem */
|
||||
#ifdef IN
|
||||
#undef IN
|
||||
#endif
|
||||
|
||||
#include "gtxwindows.h" /*Interface for this module */
|
||||
#include "gtxcurseswin.h" /*Interface for the curses module */
|
||||
#include "gtxdumbwin.h" /*Interface for the dumb terminal module */
|
||||
|
@ -167,9 +167,6 @@ ka_UserAuthenticateGeneral(afs_int32 flags, char *name, char *instance,
|
||||
/* handle smoothly the case where no AFS system calls exists (yet) */
|
||||
(void)signal(SIGSYS, SIG_IGN);
|
||||
#endif
|
||||
#ifdef AFS_DECOSF_ENV
|
||||
(void)signal(SIGTRAP, SIG_IGN);
|
||||
#endif /* AFS_DECOSF_ENV */
|
||||
if (instance == 0)
|
||||
instance = "";
|
||||
if (flags & KA_USERAUTH_ONLY_VERIFY) {
|
||||
@ -179,14 +176,9 @@ ka_UserAuthenticateGeneral(afs_int32 flags, char *name, char *instance,
|
||||
code = ka_VerifyUserToken(name, instance, realm, &key);
|
||||
}
|
||||
} else {
|
||||
#ifdef AFS_DUX40_ENV
|
||||
if (flags & KA_USERAUTH_DOSETPAG)
|
||||
afs_setpag();
|
||||
#else
|
||||
#if !defined(AFS_NT40_ENV)
|
||||
if (flags & KA_USERAUTH_DOSETPAG)
|
||||
setpag();
|
||||
#endif
|
||||
#endif
|
||||
if (flags & KA_USERAUTH_DOSETPAG2)
|
||||
dosetpag = 1;
|
||||
|
@ -1,112 +0,0 @@
|
||||
# Copyright 2000, International Business Machines Corporation and others.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# This software has been released under the terms of the IBM Public
|
||||
# License. For details, see the LICENSE file in the top-level source
|
||||
# directory or online at http://www.openafs.org/dl/license10.html
|
||||
|
||||
srcdir=@srcdir@
|
||||
include @TOP_OBJDIR@/src/config/Makefile.config
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
||||
|
||||
# OS specific object files:
|
||||
AFS_OS_OBJS = \
|
||||
osi_gcpags.o \
|
||||
osi_groups.o \
|
||||
osi_file.o \
|
||||
osi_inode.o \
|
||||
osi_misc.o \
|
||||
osi_sleep.o \
|
||||
osi_vcache.o \
|
||||
osi_vm.o \
|
||||
osi_vnodeops.o
|
||||
|
||||
AFS_OS_NFSOBJS = \
|
||||
osi_vfsops_nfs.o
|
||||
|
||||
AFS_OS_NONFSOBJS = \
|
||||
osi_vfsops.o
|
||||
|
||||
HEADER_RT = @HEADER_RT@
|
||||
|
||||
# System specific build commands and flags
|
||||
KDEFS=-DLANGUAGE_C -G 4 -I/usr/sys/include -I../include \
|
||||
-I/usr/sys/${HEADER_RT} -I/usr/sys/BINARY \
|
||||
-DDEC3000_500 -DSWAPTYPE=1 -DUERF -DOSF -DCOMPAT_43 -DMACH -DUFS \
|
||||
-DRT -DKERNEL -D_KERNEL -signed -no_excpt -Wb,-static -Wco,-nofloat \
|
||||
-Olimit 1000 -D__alpha -Umips -UMIPS
|
||||
DBUG = -O2 -g3
|
||||
DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
|
||||
OPTF=${OPT}
|
||||
OPTF2=${OPT2}
|
||||
CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
|
||||
|
||||
|
||||
# Name of directory to hold object files and libraries.
|
||||
KOBJ = STATIC
|
||||
|
||||
# This tells Makefile.common to use it's single directory build target.
|
||||
COMPDIRS = single_compdir
|
||||
INSTDIRS = single_instdir
|
||||
DESTDIRS = single_destdir
|
||||
|
||||
include Makefile.common
|
||||
|
||||
setup:
|
||||
-mkdir $(KOBJ)
|
||||
-$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
|
||||
ln -fs ../Makefile $(KOBJ)/Makefile
|
||||
ln -fs ../Makefile.common $(KOBJ)/Makefile.common
|
||||
ln -fs ../config $(KOBJ)/config
|
||||
-$(RM) -f h net netinet rpc ufs nfs machine sys vm
|
||||
-ln -fs /usr/sys/include/net net
|
||||
-ln -fs /usr/sys/include/machine machine
|
||||
-ln -fs /usr/sys/include/netinet netinet
|
||||
-ln -fs /usr/sys/include/nfs nfs
|
||||
-ln -fs /usr/sys/include/rpc rpc
|
||||
-ln -fs /usr/sys/include/sys sys
|
||||
-ln -fs /usr/sys/include/ufs ufs
|
||||
-ln -fs /usr/sys/include/sys h
|
||||
-ln -fs /usr/sys/include/vm vm
|
||||
-touch $(KOBJ)/sec_net.h
|
||||
|
||||
|
||||
# Below this line are targets when in the COMMON directory:
|
||||
LIBAFS = libafs.o
|
||||
LIBAFSNONFS = libafs.nonfs.o
|
||||
AFSMOD = afs.mod
|
||||
|
||||
INST_LIBAFS = ${DESTDIR}${afskerneldir}/${LIBAFS}
|
||||
INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/${LIBAFSNONFS}
|
||||
INST_AFSMOD = ${DESTDIR}${afskerneldir}/${AFSMOD}
|
||||
|
||||
DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
|
||||
DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
|
||||
DEST_AFSMOD = ${DEST}/root.client/bin/${AFSMOD}
|
||||
|
||||
|
||||
.PHONY: libafs install_libafs
|
||||
libafs: ${LIBAFSNONFS} ${AFSMOD}
|
||||
|
||||
install_libafs: ${LIBAFSNONFS} ${AFSMOD}
|
||||
${INSTALL} -d ${DESTDIR}${afskerneldir}
|
||||
$(INSTALL) -m 644 ${LIBAFSNONFS} ${INST_LIBAFSNONFS}
|
||||
$(INSTALL) -m 644 ${AFSMOD} ${INST_AFSMOD}
|
||||
|
||||
dest_libafs: ${LIBAFSNONFS} ${AFSMOD}
|
||||
${INSTALL} -d ${DEST}/root.client/bin
|
||||
$(INSTALL) -m 644 ${LIBAFSNONFS} ${DEST_LIBAFSNONFS}
|
||||
$(INSTALL) -m 644 ${AFSMOD} ${DEST_AFSMOD}
|
||||
|
||||
${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
|
||||
$(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS}
|
||||
|
||||
${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
|
||||
$(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS}
|
||||
|
||||
${AFSMOD}: ${LIBAFSNONFS}
|
||||
$(LD) -dc -r -o ${AFSMOD} ${LIBAFSNONFS}
|
@ -1,24 +0,0 @@
|
||||
# Copyright 2000, International Business Machines Corporation and others.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# This software has been released under the terms of the IBM Public
|
||||
# License. For details, see the LICENSE file in the top-level source
|
||||
# directory or online at http://www.openafs.org/dl/license10.html
|
||||
|
||||
srcdir=@srcdir@
|
||||
include @TOP_OBJDIR@/src/config/Makefile.config
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
||||
# System specific build commands and flags
|
||||
DEFINES=-DKERNEL -DUKERNEL -D_NO_PROTO -DOSF
|
||||
KOPTS=
|
||||
CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG} $(XCFLAGS) -pthread
|
||||
|
||||
TEST_CFLAGS=-pthread -D_NO_PROTO -D_REENTRANT -DAFS_PTHREAD_ENV -Dosf -DAFS_OSF_ENV -DOSF $(XCFLAGS)
|
||||
TEST_LDFLAGS=-pthread
|
||||
TEST_LIBS=-lm
|
||||
|
||||
include Makefile.common
|
@ -527,7 +527,7 @@ static void *IOMGR(void *dummy)
|
||||
/* Tape drives on Sun boxes do not support select and return ENXIO */
|
||||
if (errno == ENXIO) e=0, code=1;
|
||||
#endif
|
||||
#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_AIX32_ENV)
|
||||
#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV)
|
||||
/* For SGI and SVR4 - poll & select can return EAGAIN ... */
|
||||
if (errno == EAGAIN) e=0;
|
||||
#endif
|
||||
@ -843,11 +843,11 @@ int IOMGR_Select(int fds, fd_set *readfds, fd_set *writefds,
|
||||
#ifdef DEBUG
|
||||
if (lwp_debug != 0) puts("[Polling SELECT]");
|
||||
#endif /* DEBUG */
|
||||
#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_NT40_ENV)
|
||||
#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_NT40_ENV)
|
||||
again:
|
||||
#endif
|
||||
code = select(fds, readfds, writefds, exceptfds, timeout);
|
||||
#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_AIX32_ENV)
|
||||
#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV)
|
||||
/*
|
||||
* For SGI and SVR4 - poll & select can return EAGAIN ...
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@ int setlim(int limcon, uchar_t hard, int limit);
|
||||
#endif
|
||||
|
||||
#ifndef AFS_ARM_LINUX20_ENV
|
||||
#if defined(AFS_OSF_ENV) || defined(AFS_S390_LINUX20_ENV)
|
||||
#if defined(AFS_S390_LINUX20_ENV)
|
||||
int PRE_Block; /* Remnants of preemption support. */
|
||||
#else
|
||||
char PRE_Block; /* Remnants of preemption support. */
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "lwp.h"
|
||||
|
||||
#if defined(AFS_OSF_ENV) || defined(AFS_S390_LINUX20_ENV)
|
||||
#if defined(AFS_S390_LINUX20_ENV)
|
||||
extern int PRE_Block; /* used in lwp.c and process.s */
|
||||
#else
|
||||
extern char PRE_Block; /* used in lwp.c and process.s */
|
||||
|
@ -1042,22 +1042,11 @@ returnto:
|
||||
|
||||
#ifdef __alpha
|
||||
/* Code for DEC Alpha architecture */
|
||||
#ifdef AFS_OSF_ENV
|
||||
#if defined(AFS_XBSD_ENV)
|
||||
#include <machine/asm.h>
|
||||
#include <machine/regdef.h>
|
||||
#define fs0 $f2
|
||||
#define fs1 $f3
|
||||
#define fs2 $f4
|
||||
#define fs3 $f5
|
||||
#define fs4 $f6
|
||||
#define fs5 $f7
|
||||
#define fs6 $f8
|
||||
#define fs7 $f9
|
||||
#elif defined(AFS_XBSD_ENV)
|
||||
#include <machine/asm.h>
|
||||
#else /* !OSF && !XBSD */
|
||||
#else /* !XBSD */
|
||||
#include <mach/alpha/asm.h>
|
||||
#endif /* OSF */
|
||||
#endif /* !XBSD */
|
||||
|
||||
#define FRAMESIZE ((8*8)+8+(7*8))
|
||||
#define floats 0
|
||||
@ -1065,15 +1054,8 @@ returnto:
|
||||
#define returnaddr (FRAMESIZE-8)
|
||||
#define topstack 0
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
IMPORT(PRE_Block,4)
|
||||
#endif
|
||||
.align 4
|
||||
#ifdef AFS_OSF_ENV
|
||||
NESTED(savecontext,FRAMESIZE,ra)
|
||||
#else /* OSF */
|
||||
NESTED(savecontext,3,FRAMESIZE,ra,0x0400f700,0x000003fc)
|
||||
#endif /* OSF */
|
||||
ldgp gp,0(pv)
|
||||
lda t0, 1(zero)
|
||||
stl t0, PRE_Block
|
||||
@ -1110,11 +1092,7 @@ samestack:
|
||||
jsr ra,(pv),0 /* off we go */
|
||||
END(savecontext)
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
LEAF(returnto)
|
||||
#else
|
||||
LEAF(returnto,1)
|
||||
#endif
|
||||
ldgp gp,0(pv)
|
||||
|
||||
.prologue 1
|
||||
|
@ -145,11 +145,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
#endif /* !defined(AIX) */
|
||||
#endif
|
||||
sin.sin_family = hp->h_addrtype;
|
||||
#ifdef AFS_OSF_ENV
|
||||
memcpy((caddr_t) & sin.sin_addr, hp->h_addr_list[0], hp->h_length);
|
||||
#else
|
||||
memcpy((caddr_t) & sin.sin_addr, hp->h_addr, hp->h_length);
|
||||
#endif
|
||||
sin.sin_port = rport;
|
||||
/* attempt to remote authenticate first... */
|
||||
sp = getservbyport((int)rport, "tcp");
|
||||
@ -290,16 +286,6 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
|
||||
goto bad2;
|
||||
}
|
||||
if (c != 0) {
|
||||
#ifdef AFS_OSF_ENV
|
||||
/*
|
||||
* Two different protocols seem to be used;
|
||||
* one prepends a "message" byte with a "small"
|
||||
* number; the other one just sends the message
|
||||
*/
|
||||
if (isalnum(c))
|
||||
(void)write(2, &c, 1);
|
||||
|
||||
#endif
|
||||
while (read(s, &c, 1) == 1) {
|
||||
(void)write(2, &c, 1);
|
||||
if (c == '\n')
|
||||
@ -387,14 +373,6 @@ ruserok(rhost, superuser, ruser, luser)
|
||||
if (hostf) {
|
||||
if (!_validuser(hostf, fhost, luser, ruser, baselen)) {
|
||||
(void)fclose(hostf);
|
||||
#ifdef AFS_OSF_ENV
|
||||
if (first == 0) {
|
||||
(void)seteuid(suid);
|
||||
(void)setegid(sgid);
|
||||
if (group_list_size >= 0)
|
||||
(void)setgroups(group_list_size, groups);
|
||||
}
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
(void)fclose(hostf);
|
||||
|
@ -3400,7 +3400,7 @@ rxi_ReceivePacket(struct rx_packet *np, osi_socket socket,
|
||||
memset(&addr.sin_zero, 0, sizeof(addr.sin_zero));
|
||||
#ifdef STRUCT_SOCKADDR_HAS_SA_LEN
|
||||
addr.sin_len = sizeof(addr);
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#endif
|
||||
drop = (*rx_justReceived) (np, &addr);
|
||||
/* drop packet if return value is non-zero */
|
||||
if (drop)
|
||||
|
@ -589,7 +589,7 @@ rxi_Findcbi(afs_uint32 addr)
|
||||
|
||||
#else /* AFS_USERSPACE_IP_ADDR */
|
||||
|
||||
#if !defined(AFS_AIX41_ENV) && !defined(AFS_DUX40_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
|
||||
#if !defined(AFS_AIX41_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
|
||||
#define IFADDR2SA(f) (&((f)->ifa_addr))
|
||||
#else /* AFS_AIX41_ENV */
|
||||
#define IFADDR2SA(f) ((f)->ifa_addr)
|
||||
@ -936,11 +936,7 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport)
|
||||
goto bad;
|
||||
}
|
||||
#else /* defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) */
|
||||
#ifdef AFS_OSF_ENV
|
||||
nam = m_getclr(M_WAIT, MT_SONAME);
|
||||
#else /* AFS_OSF_ENV */
|
||||
nam = m_get(M_WAIT, MT_SONAME);
|
||||
#endif
|
||||
if (nam == NULL) {
|
||||
#if defined(KERNEL_HAVE_UERROR)
|
||||
setuerror(ENOBUFS);
|
||||
|
@ -31,7 +31,7 @@
|
||||
# endif
|
||||
# include "h/socket.h"
|
||||
# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
|
||||
# if !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV)
|
||||
# if !defined(AFS_AIX41_ENV)
|
||||
# include "sys/mount.h" /* it gets pulled in by something later anyway */
|
||||
# endif
|
||||
# include "h/mbuf.h"
|
||||
|
@ -24,9 +24,6 @@
|
||||
# if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
|
||||
# include "h/systm.h"
|
||||
# endif
|
||||
# ifdef AFS_OSF_ENV
|
||||
# include <net/net_globals.h>
|
||||
# endif /* AFS_OSF_ENV */
|
||||
# ifdef AFS_LINUX20_ENV
|
||||
# include "h/socket.h"
|
||||
# endif
|
||||
|
@ -135,14 +135,8 @@ rx_connection(afs_int32 * errorcode, char *syscall)
|
||||
|
||||
/* WARNING: The calling program (i.e. klog) MUST be suid-root since we need to
|
||||
* do a setgroups(2) call with the new pag.... */
|
||||
#ifdef AFS_DUX40_ENV
|
||||
#pragma weak setpag = afs_setpag
|
||||
int
|
||||
afs_setpag(void)
|
||||
#else
|
||||
int
|
||||
setpag(void)
|
||||
#endif
|
||||
{
|
||||
struct rx_connection *conn;
|
||||
clientcred creds;
|
||||
@ -192,15 +186,8 @@ setpag(void)
|
||||
|
||||
|
||||
/* Remote pioctl(2) client routine */
|
||||
#ifdef AFS_DUX40_ENV
|
||||
#pragma weak pioctl = afs_pioctl
|
||||
int
|
||||
afs_pioctl(char *path, afs_int32 cmd, struct ViceIoctl *data,
|
||||
afs_int32 follow)
|
||||
#else
|
||||
int
|
||||
pioctl(char *path, afs_int32 cmd, struct ViceIoctl *data, afs_int32 follow)
|
||||
#endif
|
||||
{
|
||||
struct rx_connection *conn;
|
||||
clientcred creds;
|
||||
@ -215,10 +202,6 @@ pioctl(char *path, afs_int32 cmd, struct ViceIoctl *data, afs_int32 follow)
|
||||
return errorcode;
|
||||
}
|
||||
(void)SetClientCreds(&creds, groups);
|
||||
#ifdef AFS_OSF_ENV
|
||||
if (!ins)
|
||||
ins = 1;
|
||||
#endif
|
||||
if (!(inbuffer = malloc(ins)))
|
||||
return (-1); /* helpless here */
|
||||
if (data->in_size)
|
||||
|
@ -29,11 +29,7 @@ extern int lpioctl(char *, int, void *, int);
|
||||
struct ViceIoctl;
|
||||
extern int pioctl(char *path, afs_int32 cmd, struct ViceIoctl *data,
|
||||
afs_int32 follow);
|
||||
#ifdef AFS_DUX40_ENV
|
||||
extern int afs_setpag(void);
|
||||
#else
|
||||
extern int setpag(void);
|
||||
#endif
|
||||
|
||||
/* rmtsysnet.c */
|
||||
extern void inparam_conversion(afs_int32, char *, afs_int32);
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <afs/vice.h>
|
||||
#include <afs/sys_prototypes.h>
|
||||
|
||||
#if defined(AFS_OSF_ENV) || defined(AFS_SGI61_ENV) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL))
|
||||
#if defined(AFS_SGI61_ENV) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL))
|
||||
/* For SGI 6.2, this is changed to 1 if it's a 32 bit kernel. */
|
||||
int afs_icl_sizeofLong = 2;
|
||||
#else
|
||||
@ -296,10 +296,7 @@ DisplayRecord(FILE *outFilep, afs_int32 *alp, afs_int32 rsize)
|
||||
printfParms[pfpix] <<= 32;
|
||||
printfParms[pfpix] |= alp[pix + 1];
|
||||
}
|
||||
#elif defined(AFS_OSF_ENV)
|
||||
printfParms[pfpix] = alp[pix + 1];
|
||||
printfParms[pfpix] |= (alp[pix] <<= 32);
|
||||
#else /* !AFS_OSF_ENV && !AFS_SGI61_ENV */
|
||||
#else /* !AFS_SGI61_ENV */
|
||||
printfParms[pfpix] = alp[pix];
|
||||
#endif
|
||||
pfpix++;
|
||||
@ -510,9 +507,6 @@ DisplayRecord(FILE *outFilep, afs_int32 *alp, afs_int32 rsize)
|
||||
|
||||
|
||||
#include <locale.h>
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <limits.h>
|
||||
#endif
|
||||
#include <nl_types.h>
|
||||
|
||||
#define FACILITY_CODE_MASK 0xF0000000
|
||||
|
@ -116,45 +116,6 @@ struct ncp_sb_info {
|
||||
|
||||
#include <afs/stds.h>
|
||||
|
||||
#if defined(AFS_OSF_ENV)
|
||||
#define KERNEL
|
||||
#define UNIX_LOCKS
|
||||
#define _KERNEL 1
|
||||
#ifdef _KERN_LOCK_H_
|
||||
#include FFFFF
|
||||
#endif
|
||||
#include <kern/lock.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <arch/alpha/pmap.h>
|
||||
|
||||
/*
|
||||
* beginning with DUX 4.0A, the system header files define the macros
|
||||
*
|
||||
* KSEG_TO_PHYS()
|
||||
* IS_KSEG_VA()
|
||||
* IS_SEG1_VA()
|
||||
*
|
||||
* to be calls to the kernel functions
|
||||
*
|
||||
* kseg_to_phys()
|
||||
* is_kseg_va()
|
||||
* is_seg1_va()
|
||||
*
|
||||
* when _KERNEL is defined, and expressions otherwise. Since need
|
||||
* to define _KERNEL, we redefine these kernel functions as macros
|
||||
* for the expressions that we would have gotten if _KERNEL had not
|
||||
* been defined. Yes, this duplicates code from the header files, but
|
||||
* there's no simple way around it.
|
||||
*/
|
||||
|
||||
#define kseg_to_phys(addr) ((vm_offset_t)(addr) - UNITY_BASE)
|
||||
#define is_kseg_va(x) (((unsigned long)(x) & SEG1_BASE) == UNITY_BASE)
|
||||
#define is_seg1_va(x) (((unsigned long)(x) & SEG1_BASE) == SEG1_BASE)
|
||||
|
||||
#undef KERNEL
|
||||
#undef _KERNEL
|
||||
#endif
|
||||
|
||||
#ifdef AFS_SUN5_ENV /*XXXXX*/
|
||||
#include <sys/t_lock.h>
|
||||
struct vnode foo;
|
||||
@ -203,7 +164,7 @@ struct vnode foo;
|
||||
# include <netinet/in.h> /* struct in_addr */
|
||||
#endif
|
||||
|
||||
#if defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV)
|
||||
#if defined(AFS_SGI_ENV)
|
||||
#ifdef AFS_SGI_ENV
|
||||
#include <sys/vnode.h>
|
||||
#endif /* AFS_SGI_ENV */
|
||||
@ -355,15 +316,6 @@ typedef kmutex_t afs_kmutex_t;
|
||||
typedef kcondvar_t afs_kcondvar_t;
|
||||
#endif /* AFS_SUN5_ENV */
|
||||
|
||||
#ifdef AFS_DUX40_ENV
|
||||
#define RX_ENABLE_LOCKS
|
||||
typedef struct {
|
||||
unsigned long lock;
|
||||
void *owner;
|
||||
} afs_kmutex_t;
|
||||
typedef int afs_kcondvar_t;
|
||||
#endif /* AFS_DUX40_ENV */
|
||||
|
||||
#ifdef AFS_HPUX110_ENV
|
||||
#define RX_ENABLE_LOCKS
|
||||
typedef struct {
|
||||
@ -449,15 +401,6 @@ extern off64_t lseek64();
|
||||
|
||||
#undef KERNEL
|
||||
|
||||
#if defined(AFS_OSF_ENV) && !defined(v_count)
|
||||
#define v_count v_usecount
|
||||
#endif
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
#define KERNELBASE 0x80000000
|
||||
#define coreadj(x) ((int)x - KERNELBASE)
|
||||
#endif
|
||||
|
||||
#if defined(AFS_SGI_ENV)
|
||||
#define UNIX "/unix"
|
||||
#else
|
||||
@ -1043,15 +986,6 @@ findsym(char *sname, off_t * offset)
|
||||
errno, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
#if defined(AFS_OSF_ENV)
|
||||
if (mem) {
|
||||
long X;
|
||||
|
||||
X = coreadj(request[0].n_value);
|
||||
request[0].n_value = X;
|
||||
}
|
||||
#endif /* defined(AFS_OSF_ENV) */
|
||||
|
||||
*offset = request[0].n_value;
|
||||
if (!request[0].n_value) {
|
||||
printf("(WARNING) Couldn't find %s in %s. Proceeding..\n", sname,
|
||||
@ -2197,79 +2131,6 @@ readmem(kmem, buf, vad, len)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
static
|
||||
read_addr(int fd, unsigned long addr, unsigned long *val)
|
||||
{
|
||||
if (lseek(fd, addr, SEEK_SET) == -1)
|
||||
return (0);
|
||||
if (read(fd, val, sizeof(long)) != sizeof(long))
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
static pt_entry_t *ptes = NULL;
|
||||
static
|
||||
addr_to_offset(unsigned long addr, unsigned long *ret, int fd)
|
||||
{
|
||||
off_t symoff;
|
||||
pt_entry_t pte, *val;
|
||||
char *str, *ptr;
|
||||
|
||||
if (IS_SEG1_VA(addr)) {
|
||||
if (ptes == NULL) {
|
||||
int i, loc;
|
||||
unsigned long loc1, loc2[2];
|
||||
findsym("kernel_pmap", &symoff);
|
||||
loc1 = coreadj(symoff);
|
||||
/*printf("ptes=%lx -> %lx\n", symoff, loc1); */
|
||||
if (lseek(fd, loc1, L_SET /*0 */ ) != loc1) {
|
||||
perror("lseek");
|
||||
exit(1);
|
||||
}
|
||||
if ((i = read(fd, (char *)&loc1, sizeof(long))) != sizeof(long)) {
|
||||
printf("Read of kerne_map failed\n");
|
||||
return; /*exit(1); */
|
||||
}
|
||||
loc = loc1;
|
||||
/*printf("loc1 %lx -> %lx\n", loc1, loc); */
|
||||
if (lseek(fd, loc, L_SET /*0 */ ) != loc) {
|
||||
perror("lseek");
|
||||
exit(1);
|
||||
}
|
||||
if ((i =
|
||||
read(fd, (char *)loc2,
|
||||
2 * sizeof(long))) != 2 * sizeof(long)) {
|
||||
printf("Read of kerne_map failed\n");
|
||||
return; /*exit(1); */
|
||||
}
|
||||
ptes = (pt_entry_t *) loc2[1];
|
||||
/*printf("ptes=%lx\n", ptes); */
|
||||
|
||||
}
|
||||
if (!addr_to_offset
|
||||
((unsigned long)(ptes + LEVEL1_PT_OFFSET(addr)),
|
||||
(unsigned long *)&val, fd))
|
||||
return (0);
|
||||
if (!read_addr(fd, (unsigned long)val, (unsigned long *)&pte))
|
||||
return (0);
|
||||
val = ((pt_entry_t *) PTETOPHYS(&pte)) + LEVEL2_PT_OFFSET(addr);
|
||||
if (!read_addr(fd, (unsigned long)val, (unsigned long *)&pte))
|
||||
return (0);
|
||||
val = ((pt_entry_t *) PTETOPHYS(&pte)) + LEVEL3_PT_OFFSET(addr);
|
||||
if (!read_addr(fd, (unsigned long)val, (unsigned long *)&pte))
|
||||
return (0);
|
||||
*ret = PTETOPHYS(&pte) + (addr & ((1 << PGSHIFT) - 1));
|
||||
return (1);
|
||||
} else if (IS_KSEG_VA(addr)) {
|
||||
*ret = KSEG_TO_PHYS(addr);
|
||||
return (1);
|
||||
} else {
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef AFS_KDUMP_LIB
|
||||
void
|
||||
kread(int kmem, off_t loc, void *buf, KDUMP_SIZE_T len)
|
||||
@ -2278,19 +2139,6 @@ kread(int kmem, off_t loc, void *buf, KDUMP_SIZE_T len)
|
||||
|
||||
memset(buf, 0, len);
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
if (mem) {
|
||||
unsigned long ret;
|
||||
i = addr_to_offset(loc, &ret, kmem);
|
||||
if (i == 1)
|
||||
loc = ret;
|
||||
else {
|
||||
unsigned long loc1;
|
||||
loc1 = coreadj(loc);
|
||||
loc = loc1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if defined(sparc) && !defined(__linux__)
|
||||
#ifndef AFS_SUN5_ENV
|
||||
if (mem) {
|
||||
@ -2301,7 +2149,6 @@ kread(int kmem, off_t loc, void *buf, KDUMP_SIZE_T len)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if ! defined(AFS_SUN5_ENV)
|
||||
#if defined(AFS_SGI61_ENV) && !defined(AFS_32BIT_KERNEL_ENV)
|
||||
if (lseek64(kmem, loc, L_SET /*0 */ ) != loc)
|
||||
@ -2997,17 +2844,6 @@ print_vlru(int kmem)
|
||||
printf("\n\nPrinting vcache VLRU info (oldest first)...\n\n");
|
||||
findsym("afs_cacheStats", &symoff);
|
||||
kread(kmem, symoff, (char *)&maxvcount, sizeof maxvcount);
|
||||
#ifdef AFS_OSF_ENV
|
||||
findsym("afs_maxvcount", &symoff);
|
||||
kread(kmem, symoff, (char *)&maxvcount, sizeof maxvcount);
|
||||
findsym("afs_vcount", &symoff);
|
||||
kread(kmem, symoff, (char *)&vcount, sizeof vcount);
|
||||
findsym("max_vnodes", &symoff);
|
||||
kread(kmem, symoff, (char *)&nvnode, sizeof nvnode);
|
||||
printf("max number of vcache entries = %d\n", maxvcount);
|
||||
printf("number of vcaches in use = %d\n", vcount);
|
||||
printf("total number of system vnode entries = %d\n", nvnode);
|
||||
#endif
|
||||
findsym("VLRU", &symoff);
|
||||
kread(kmem, symoff, (char *)&VLRU, sizeof VLRU);
|
||||
vlru_addr = (u_long) symoff;
|
||||
@ -3234,11 +3070,9 @@ print_global_afs_cache(int kmem)
|
||||
findsym("afs_mariner", &symoff);
|
||||
kread(kmem, symoff, (char *)&count, sizeof count);
|
||||
printf("\tafs_mariner = 0x%x\n", count);
|
||||
#ifndef AFS_OSF_ENV
|
||||
findsym("freeVCList", &symoff);
|
||||
kread(kmem, symoff, (char *)&count, sizeof count);
|
||||
printf("\tafs_freeVCList = 0x%x XXX\n", count);
|
||||
#endif
|
||||
findsym("afs_freeDCList", &symoff);
|
||||
kread(kmem, symoff, (char *)&count, sizeof count);
|
||||
printf("\tfreeDCList = 0x%x\n", count);
|
||||
|
@ -25,10 +25,10 @@ MODULE_CFLAGS=${VFSCK_CFLAGS}
|
||||
|
||||
SRCS= dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \
|
||||
pass4.c pass5.c setup.c utilities.c ufs_subr.c \
|
||||
ufs_tables.c dirutils.c vprintf.c proplist.c
|
||||
ufs_tables.c dirutils.c vprintf.c
|
||||
|
||||
OBJS= dir.o inode.o main.o pass1.o pass1b.o pass2.o pass3.o pass4.o \
|
||||
pass5.o setup.o utilities.o dirutils.o vprintf.o proplist.o \
|
||||
pass5.o setup.o utilities.o dirutils.o vprintf.o \
|
||||
ufs_subr.o ufs_tables.o
|
||||
|
||||
all: vfsck
|
||||
|
@ -40,17 +40,6 @@
|
||||
|
||||
#define VICE /* allow us to put our changes in at will */
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#include <sys/vnode.h>
|
||||
@ -77,7 +66,6 @@
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#ifdef AFS_SUN_ENV
|
||||
#ifdef AFS_SUN5_ENV
|
||||
|
@ -114,13 +114,6 @@ struct bufarea *getdatablk();
|
||||
#define sblock (*sblk.b_un.b_fs)
|
||||
#define cgrp (*cgblk.b_un.b_cg)
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
/*
|
||||
* struct direct -> struct dirent
|
||||
*/
|
||||
#define direct dirent
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
enum fixstate { DONTKNOW, NOFIX, FIX };
|
||||
|
||||
struct inodesc {
|
||||
@ -250,12 +243,7 @@ int rflag; /* check raw file systems */
|
||||
#include <sys/sysmacros.h>
|
||||
FILE *logfile; /* additional place for log message, for non-root file systems */
|
||||
#else /* AFS_SUN5_ENV */
|
||||
#ifdef AFS_OSF_ENV
|
||||
FILE *logfile; /* additional place for log message, for non-root file systems */
|
||||
char fflag; /* force fsck to check a mounted fs */
|
||||
#else /* AFS_OSF_ENV */
|
||||
struct _iobuf *logfile; /* additional place for log message, for non-root file systems */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#endif /* AFS_SUN5_ENV */
|
||||
#endif /* VICE */
|
||||
|
||||
|
@ -40,17 +40,6 @@
|
||||
|
||||
#define VICE /* control whether AFS changes are present */
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/mount.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#include <sys/vnode.h>
|
||||
@ -74,7 +63,6 @@
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#include <afs/osi_inode.h>
|
||||
#include "fsck.h"
|
||||
@ -109,24 +97,9 @@ ckinode(dp, idesc)
|
||||
idesc->id_filesize = dp->di_size;
|
||||
if ((dp->di_mode & IFMT) == IFBLK || (dp->di_mode & IFMT) == IFCHR)
|
||||
return (KEEPON);
|
||||
#ifdef AFS_OSF_ENV
|
||||
if ((dp->di_flags & IC_FASTLINK) != 0) {
|
||||
return (KEEPON);
|
||||
}
|
||||
#endif /* AFS_OSF_ENV */
|
||||
dino = *dp;
|
||||
ndb = howmany(dino.di_size, (UOFF_T) sblock.fs_bsize);
|
||||
ap = &dino.di_db[0];
|
||||
#ifdef AFS_OSF_ENV
|
||||
/*
|
||||
* Check property lists on pass1
|
||||
*/
|
||||
if (idesc->id_func == pass1check && dino.di_flags & IC_PROPLIST && *ap) {
|
||||
ret = proplist_scan(dp, idesc);
|
||||
if (ret & STOP)
|
||||
return (ret);
|
||||
}
|
||||
#endif /* AFS_OSF_ENV */
|
||||
for (; ap < &dino.di_db[NDADDR]; ap++) {
|
||||
if (--ndb == 0 && (offset = blkoff(&sblock, dino.di_size)) != 0)
|
||||
idesc->id_numfrags =
|
||||
|
@ -52,12 +52,6 @@
|
||||
#undef KERNEL
|
||||
#endif
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#include <sys/vnode.h>
|
||||
@ -85,7 +79,6 @@
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#include <sys/wait.h>
|
||||
#ifdef XAFS_SUN_ENV
|
||||
@ -178,7 +171,7 @@ main(argc, argv)
|
||||
#if defined(AFS_HPUX_ENV)
|
||||
pclean = 0;
|
||||
#endif
|
||||
#if defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV)
|
||||
#if defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV)
|
||||
fflag = 0;
|
||||
#endif
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -334,11 +327,6 @@ main(argc, argv)
|
||||
break;
|
||||
#endif /* AFS_HPUX100_ENV */
|
||||
#endif /* AFS_SUN5_ENV */
|
||||
#ifdef AFS_OSF_ENV
|
||||
case 'o':
|
||||
fflag++;
|
||||
break;
|
||||
#endif /* AFS_OSF_ENV */
|
||||
case 'n':
|
||||
case 'N':
|
||||
nflag++;
|
||||
@ -435,11 +423,6 @@ main(argc, argv)
|
||||
&& strcmp(fsp->fs_type, FSTAB_RO)
|
||||
&& strcmp(fsp->fs_type, FSTAB_RQ))
|
||||
continue;
|
||||
#ifdef AFS_OSF_ENV
|
||||
if (strcmp(fsp->fs_vfstype, "ufs") || fsp->fs_passno == 0) {
|
||||
continue;
|
||||
}
|
||||
#endif /* AFS_OSF_ENV */
|
||||
if (preen == 0 || passno == 1 && fsp->fs_passno == 1) {
|
||||
if (passno == 1) {
|
||||
name = blockcheck(fsp->fs_spec);
|
||||
@ -618,10 +601,6 @@ checkfilesys(filesys, parname)
|
||||
char devbuffer[128];
|
||||
int ret_val;
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
int temp;
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#ifdef AFS_SUN_ENV
|
||||
iscorrupt = 1;
|
||||
#endif
|
||||
@ -659,10 +638,6 @@ checkfilesys(filesys, parname)
|
||||
#ifdef AFS_HPUX_ENV
|
||||
} else if (ret_val == -1) { /* pclean && FS_CLEAN */
|
||||
return (1);
|
||||
#endif
|
||||
#if defined(AFS_OSF_ENV)
|
||||
} else if (ret_val == FS_CLEAN) { /* pclean && FS_CLEAN */
|
||||
return (1);
|
||||
#endif
|
||||
}
|
||||
#if defined(AFS_HPUX100_ENV)
|
||||
@ -874,21 +849,10 @@ checkfilesys(filesys, parname)
|
||||
sbdirty();
|
||||
}
|
||||
#else
|
||||
#ifdef AFS_OSF_ENV
|
||||
if (!nflag && !bflag && !hotroot) {
|
||||
temp = fsmodified;
|
||||
sblock.fs_clean = FS_CLEAN;
|
||||
(void)time(&sblock.fs_time);
|
||||
sbdirty();
|
||||
flush(fswritefd, &sblk);
|
||||
fsmodified = temp;
|
||||
}
|
||||
#else /* AFS_OSF_ENV */
|
||||
if (fsmodified) {
|
||||
(void)time(&sblock.fs_time);
|
||||
sbdirty();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
ckfini();
|
||||
free(blockmap);
|
||||
@ -957,18 +921,6 @@ checkfilesys(filesys, parname)
|
||||
failed = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef AFS_OSF_ENV
|
||||
/* if system mounted / as read-only, we'll try to fix now */
|
||||
if (access("/", W_OK) < 0 && errno == EROFS) {
|
||||
printf("Can't RW acceess /; %d\n", errno);
|
||||
code = system("/sbin/mount -u /");
|
||||
if (code) {
|
||||
printf("Couldn't remount / R/W; continuing anyway (%d).\n",
|
||||
errno);
|
||||
failed = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
rmdir(pname);
|
||||
unlink(pname);
|
||||
@ -1010,14 +962,10 @@ checkfilesys(filesys, parname)
|
||||
fstat(fd, &tstat);
|
||||
close(fd);
|
||||
}
|
||||
#if !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_OSF_ENV)
|
||||
#if !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV)
|
||||
unmount(pname);
|
||||
#else
|
||||
#if defined(AFS_OSF_ENV)
|
||||
umount(pname, MNT_NOFORCE);
|
||||
#else /* AFS_OSF_ENV */
|
||||
umount(devname);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
rmdir(pname);
|
||||
@ -1054,9 +1002,7 @@ blockcheck(name)
|
||||
if ((stblock.st_mode & S_IFMT) == S_IFBLK) {
|
||||
if (stslash.st_dev == stblock.st_rdev) {
|
||||
hotroot++;
|
||||
#if !defined(AFS_OSF_ENV) /* OSF/1 always uses the raw device, even for / */
|
||||
return (name);
|
||||
#endif /* AFS_OSF_ENV */
|
||||
}
|
||||
raw = rawname(name);
|
||||
if (raw) {
|
||||
|
@ -23,17 +23,6 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#define VICE
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#include <sys/vnode.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -58,7 +47,6 @@ extern int ge_danger;
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#include <afs/osi_inode.h>
|
||||
#include "fsck.h"
|
||||
@ -247,9 +235,6 @@ pass1()
|
||||
if ((dp->di_mode & IFMT) == IFBLK
|
||||
|| (dp->di_mode & IFMT) == IFCHR)
|
||||
ndb++;
|
||||
#ifdef AFS_OSF_ENV
|
||||
if ((dp->di_flags & IC_FASTLINK) == 0) {
|
||||
#endif /* AFS_OSF_ENV */
|
||||
for (j = ndb; j < NDADDR; j++) {
|
||||
#if defined(AFS_HPUX_ENV) && (defined(DUX) || defined(CNODE_DEV))
|
||||
/*
|
||||
@ -284,9 +269,6 @@ pass1()
|
||||
#if defined(AFS_HPUX_ENV)
|
||||
ignore_direct_block_check:
|
||||
#endif
|
||||
#ifdef AFS_OSF_ENV
|
||||
}
|
||||
#endif /* AFS_OSF_ENV */
|
||||
if (ftypeok(dp) == 0)
|
||||
goto unknown;
|
||||
n_files++;
|
||||
|
@ -23,17 +23,6 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#define VICE
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#include <sys/vnode.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -56,7 +45,6 @@
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#include "fsck.h"
|
||||
|
||||
|
@ -39,17 +39,6 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#define VICE
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#include <sys/vnode.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -72,7 +61,6 @@
|
||||
#include <sys/fs.h>
|
||||
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#include <afs/osi_inode.h>
|
||||
|
||||
#include "fsck.h"
|
||||
|
@ -24,17 +24,6 @@
|
||||
|
||||
#define VICE
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#include <sys/vnode.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -57,7 +46,6 @@
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#include <afs/osi_inode.h>
|
||||
#include "fsck.h"
|
||||
|
@ -23,17 +23,6 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#define VICE
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#include <sys/vnode.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -56,7 +45,6 @@
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#include <afs/osi_inode.h>
|
||||
|
||||
#include "fsck.h"
|
||||
|
@ -23,17 +23,6 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#define VICE
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#include <sys/vnode.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -56,12 +45,11 @@
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#include <afs/osi_inode.h>
|
||||
|
||||
#include "fsck.h"
|
||||
|
||||
#if defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV)
|
||||
#if defined(AFS_SUN_ENV)
|
||||
#define AFS_NEWCG_ENV
|
||||
#else
|
||||
#undef AFS_NEWCG_ENV
|
||||
|
@ -1,425 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000, International Business Machines Corporation and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*/
|
||||
|
||||
#include <afsconfig.h>
|
||||
#include <afs/param.h>
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
#define VICE /* control whether AFS changes are present */
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
|
||||
#include <sys/mount.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/dinode.h>
|
||||
#include <sys/proplist.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
|
||||
#include <afs/osi_inode.h>
|
||||
#include "fsck.h"
|
||||
|
||||
struct prop_entry_desc {
|
||||
struct prop_entry_desc *next;
|
||||
int flags;
|
||||
#define PROP_ENTRY_BAD 0x1
|
||||
#define PROP_ENTRY_DUP 0x2
|
||||
daddr_t blkno;
|
||||
int blksize;
|
||||
long offset;
|
||||
long size;
|
||||
char name[PROPLIST_NAME_MAX];
|
||||
};
|
||||
|
||||
int
|
||||
proplist_scan(dp, idesc)
|
||||
struct dinode *dp;
|
||||
struct inodesc *idesc;
|
||||
{
|
||||
struct proplist_desc1 *pl_descp;
|
||||
struct bufarea *bp;
|
||||
struct dinode *ndp;
|
||||
long code;
|
||||
int offsetinbuf, blksize;
|
||||
struct prop_entry_desc *entry_list, *next;
|
||||
|
||||
code = proplist_blkscan(dp, idesc, &entry_list);
|
||||
if (code & STOP)
|
||||
goto out;
|
||||
|
||||
proplist_markdup(entry_list);
|
||||
|
||||
code = proplist_updateblks(dp, idesc, entry_list);
|
||||
if (code & STOP)
|
||||
goto out;
|
||||
|
||||
ndp = ginode(idesc->id_number);
|
||||
if ((ndp->di_flags & IC_PROPLIST) == 0) {
|
||||
code = 0;
|
||||
goto out;
|
||||
}
|
||||
if ((ndp->di_flags & (IC_PROPLIST_BLOCK | IC_PROPLIST_FRAG)) ==
|
||||
(IC_PROPLIST_BLOCK | IC_PROPLIST_FRAG)) {
|
||||
code = 0;
|
||||
goto out;
|
||||
}
|
||||
if (ndp->di_flags & IC_PROPLIST_FRAG) {
|
||||
idesc->id_numfrags = 1;
|
||||
blksize = sblock.fs_fsize;
|
||||
} else {
|
||||
idesc->id_numfrags = sblock.fs_frag;
|
||||
blksize = sblock.fs_bsize;
|
||||
}
|
||||
idesc->id_blkno = ndp->di_proplb;
|
||||
for (;;) {
|
||||
code = (*idesc->id_func) (idesc);
|
||||
if (code & STOP)
|
||||
goto out;
|
||||
|
||||
bp = getdatablk(idesc->id_blkno, blksize);
|
||||
for (offsetinbuf = 0; offsetinbuf < blksize;) {
|
||||
pl_descp =
|
||||
(struct proplist_desc1 *)(bp->b_un.b_buf + offsetinbuf);
|
||||
offsetinbuf += pl_descp->pl_nextentry;
|
||||
}
|
||||
if (pl_descp->pl_nextfsb > 0) {
|
||||
daddr_t save_blkno;
|
||||
|
||||
save_blkno = pl_descp->pl_nextfsb;
|
||||
bp->b_flags &= ~B_INUSE;
|
||||
idesc->id_blkno = save_blkno;
|
||||
blksize = sblock.fs_bsize;
|
||||
idesc->id_numfrags = sblock.fs_frag;
|
||||
continue;
|
||||
}
|
||||
bp->b_flags &= ~B_INUSE;
|
||||
break;
|
||||
}
|
||||
out:
|
||||
for (next = entry_list; entry_list != NULL;) {
|
||||
next = entry_list->next;
|
||||
free(entry_list);
|
||||
entry_list = next;
|
||||
}
|
||||
return (code);
|
||||
}
|
||||
|
||||
int
|
||||
proplist_blkscan(dp, idesc, entry_list)
|
||||
struct dinode *dp;
|
||||
struct inodesc *idesc;
|
||||
struct prop_entry_desc **entry_list;
|
||||
{
|
||||
struct proplist_desc1 *pl_descp;
|
||||
struct bufarea *bp;
|
||||
struct prop_entry_desc *entry, *lastentry;
|
||||
int blksize;
|
||||
long code, valueresid;
|
||||
|
||||
*entry_list = NULL;
|
||||
idesc->id_blkno = dp->di_proplb;
|
||||
if (dp->di_flags & IC_PROPLIST_FRAG) {
|
||||
blksize = sblock.fs_fsize;
|
||||
idesc->id_numfrags = 1;
|
||||
} else {
|
||||
blksize = sblock.fs_bsize;
|
||||
idesc->id_numfrags = sblock.fs_frag;
|
||||
}
|
||||
idesc->id_loc = 0;
|
||||
valueresid = 0;
|
||||
for (;;) {
|
||||
if (idesc->id_loc == 0) {
|
||||
if (chkrange(idesc->id_blkno, idesc->id_numfrags)) {
|
||||
code = proplist_blkdel(dp, idesc, 0);
|
||||
return (code);
|
||||
}
|
||||
bp = getdatablk(idesc->id_blkno, blksize);
|
||||
if (proplist_chkblock(bp, blksize)) {
|
||||
bp->b_flags &= ~B_INUSE;
|
||||
pwarn("PROPERTY LIST BLOCK CORRUPTED I=%u", idesc->id_number);
|
||||
if (preen)
|
||||
printf(" (CLEARED)\n");
|
||||
else if (reply("CLEAR") == 0)
|
||||
return (SKIP);
|
||||
code = proplist_blkdel(dp, idesc, 0);
|
||||
return (code);
|
||||
}
|
||||
}
|
||||
pl_descp = (struct proplist_desc1 *)(bp->b_un.b_buf + idesc->id_loc);
|
||||
if (pl_descp->pl_entrysize) {
|
||||
if (valueresid < 0
|
||||
|| (valueresid
|
||||
&& strcmp((char *)&pl_descp[1], entry->name))) {
|
||||
entry->flags |= PROP_ENTRY_BAD;
|
||||
valueresid = 0;
|
||||
}
|
||||
if (valueresid == 0) {
|
||||
entry = malloc(sizeof(struct prop_entry_desc));
|
||||
if (entry == NULL)
|
||||
return (SKIP);
|
||||
entry->next = NULL;
|
||||
entry->flags = 0;
|
||||
memcpy(entry->name, (char *)&pl_descp[1],
|
||||
pl_descp->pl_namelen);
|
||||
entry->blkno = idesc->id_blkno;
|
||||
entry->blksize = blksize;
|
||||
entry->offset = idesc->id_loc;
|
||||
entry->size = 0;
|
||||
if (*entry_list != NULL)
|
||||
lastentry->next = entry;
|
||||
else
|
||||
*entry_list = entry;
|
||||
lastentry = entry;
|
||||
valueresid = pl_descp->pl_valuelen;
|
||||
}
|
||||
entry->size += pl_descp->pl_entrysize;
|
||||
valueresid -= pl_descp->pl_valuelen_entry;
|
||||
}
|
||||
if (pl_descp->pl_nextfsb > 0) {
|
||||
daddr_t save_blkno;
|
||||
|
||||
save_blkno = pl_descp->pl_nextfsb;
|
||||
bp->b_flags &= ~B_INUSE;
|
||||
idesc->id_blkno = save_blkno;
|
||||
idesc->id_numfrags = sblock.fs_frag;
|
||||
blksize = sblock.fs_bsize;
|
||||
idesc->id_loc = 0;
|
||||
continue;
|
||||
}
|
||||
idesc->id_loc += pl_descp->pl_nextentry;
|
||||
if (idesc->id_loc == blksize) {
|
||||
bp->b_flags &= ~B_INUSE;
|
||||
if (valueresid) {
|
||||
entry->flags |= PROP_ENTRY_BAD;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
proplist_markdup(entry_list)
|
||||
struct prop_entry_desc *entry_list;
|
||||
{
|
||||
struct prop_entry_desc *start, *cur;
|
||||
int bad_entries, dup_entries;
|
||||
|
||||
for (start = entry_list; start != NULL; start = start->next) {
|
||||
if (start->flags & (PROP_ENTRY_BAD | PROP_ENTRY_DUP))
|
||||
continue;
|
||||
for (cur = start->next; cur != NULL; cur = cur->next) {
|
||||
if (!strcmp(start->name, cur->name))
|
||||
cur->flags |= PROP_ENTRY_DUP;
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
proplist_updateblks(dp, idesc, entry_list)
|
||||
struct dinode *dp;
|
||||
struct inodesc *idesc;
|
||||
struct prop_entry_desc *entry_list;
|
||||
{
|
||||
struct proplist_desc1 *pl_descp, *prev_pl_descp;
|
||||
struct bufarea *bp;
|
||||
struct prop_entry_desc *cur;
|
||||
long code;
|
||||
daddr_t next_blkno;
|
||||
int resid, offset, free, blksize;
|
||||
|
||||
for (cur = entry_list; cur != NULL; cur = cur->next) {
|
||||
if (cur->flags == 0)
|
||||
continue;
|
||||
idesc->id_blkno = cur->blkno;
|
||||
idesc->id_loc = cur->offset;
|
||||
blksize = cur->blksize;
|
||||
|
||||
if (cur->flags & PROP_ENTRY_BAD)
|
||||
pwarn("BAD PROPERTY LIST ENTRY FOUND I=%u NAME %0.10s",
|
||||
idesc->id_number, cur->name);
|
||||
else
|
||||
pwarn("DUP PROPERTY LIST ENTRY FOUND I=%u NAME %0.10s",
|
||||
idesc->id_number, cur->name);
|
||||
if (preen)
|
||||
printf(" (FIXED)\n");
|
||||
else if (reply("FIX") == 0)
|
||||
continue;
|
||||
for (resid = cur->size; resid > 0;) {
|
||||
bp = getdatablk(idesc->id_blkno, blksize);
|
||||
pl_descp =
|
||||
(struct proplist_desc1 *)(bp->b_un.b_buf + idesc->id_loc);
|
||||
if (strcmp((char *)&pl_descp[1], cur->name)) {
|
||||
bp->b_flags &= ~B_INUSE;
|
||||
break;
|
||||
}
|
||||
if (idesc->id_loc) {
|
||||
prev_pl_descp = (struct proplist_desc1 *)bp->b_un.b_buf;
|
||||
for (offset = 0; offset < cur->offset;) {
|
||||
prev_pl_descp =
|
||||
(struct proplist_desc1 *)(bp->b_un.b_buf + offset);
|
||||
offset += prev_pl_descp->pl_nextentry;
|
||||
}
|
||||
/*
|
||||
* prev_pl_descp now points to the entry
|
||||
* before the one we need to delete
|
||||
*
|
||||
* Coalesce into previous entry
|
||||
*/
|
||||
prev_pl_descp->pl_nextentry += pl_descp->pl_nextentry;
|
||||
prev_pl_descp->pl_nextfsb = pl_descp->pl_nextfsb;
|
||||
}
|
||||
resid -= pl_descp->pl_entrysize;
|
||||
pl_descp->pl_entrysize = 0;
|
||||
pl_descp->pl_namelen = 0;
|
||||
pl_descp->pl_valuelen = 0;
|
||||
|
||||
next_blkno = pl_descp->pl_nextfsb;
|
||||
free = prop_avail(bp, blksize);
|
||||
dirty(bp);
|
||||
if (free == blksize)
|
||||
proplist_blkdel(dp, idesc, next_blkno);
|
||||
|
||||
if (next_blkno && resid > 0) {
|
||||
idesc->id_blkno = next_blkno;
|
||||
blksize = sblock.fs_bsize;
|
||||
idesc->id_loc = 0;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
prop_avail(bp, blksize)
|
||||
struct bufarea *bp;
|
||||
int blksize;
|
||||
{
|
||||
struct proplist_desc1 *pl_descp;
|
||||
int offsetinbuf, total_avail;
|
||||
|
||||
total_avail = 0;
|
||||
for (offsetinbuf = 0; offsetinbuf < blksize;) {
|
||||
pl_descp = (struct proplist_desc1 *)(bp->b_un.b_buf + offsetinbuf);
|
||||
total_avail += (pl_descp->pl_nextentry - pl_descp->pl_entrysize);
|
||||
offsetinbuf += pl_descp->pl_nextentry;
|
||||
}
|
||||
return (total_avail);
|
||||
}
|
||||
|
||||
int
|
||||
proplist_chkblock(bp, blksize)
|
||||
struct bufarea *bp;
|
||||
int blksize;
|
||||
{
|
||||
struct proplist_desc1 *pl_descp;
|
||||
int offsetinbuf;
|
||||
|
||||
for (offsetinbuf = 0; offsetinbuf < blksize;) {
|
||||
pl_descp = (struct proplist_desc1 *)(bp->b_un.b_buf + offsetinbuf);
|
||||
if (pl_descp->pl_magic != PROP_LIST_MAGIC_VERS1) {
|
||||
return (1);
|
||||
}
|
||||
if (pl_descp->pl_entrysize % 8 || pl_descp->pl_nextentry % 8
|
||||
|| pl_descp->pl_nextentry < UFSPROPLIST_STRUCT
|
||||
|| pl_descp->pl_nextentry + offsetinbuf > blksize) {
|
||||
return (1);
|
||||
}
|
||||
if (pl_descp->pl_entrysize
|
||||
&& (pl_descp->pl_namelen > PROPLIST_NAME_MAX
|
||||
|| pl_descp->pl_valuelen_entry > pl_descp->pl_valuelen
|
||||
|| pl_descp->pl_entrysize > pl_descp->pl_nextentry
|
||||
|| pl_descp->pl_entrysize !=
|
||||
UFSPROPLIST_SIZE(pl_descp->pl_namelen,
|
||||
pl_descp->pl_valuelen_entry)
|
||||
|| strlen((char *)&pl_descp[1]) > pl_descp->pl_namelen)) {
|
||||
return (1);
|
||||
}
|
||||
offsetinbuf += pl_descp->pl_nextentry;
|
||||
if (offsetinbuf == blksize) {
|
||||
bp->b_flags &= ~B_INUSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (offsetinbuf != blksize) {
|
||||
return (1);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
proplist_blkdel(dp, idesc, nextblk)
|
||||
struct dinode *dp;
|
||||
struct inodesc *idesc;
|
||||
daddr_t nextblk;
|
||||
{
|
||||
struct proplist_desc1 *pl_descp;
|
||||
struct bufarea *bp;
|
||||
int blksize;
|
||||
daddr_t badblkno;
|
||||
|
||||
badblkno = idesc->id_blkno;
|
||||
if (dp->di_proplb == badblkno) {
|
||||
dp = ginode(idesc->id_number);
|
||||
dp->di_proplb = nextblk;
|
||||
dp->di_flags &= ~IC_PROPLIST;
|
||||
if (nextblk)
|
||||
dp->di_flags |= IC_PROPLIST_BLOCK;
|
||||
inodirty();
|
||||
return (ALTERED);
|
||||
}
|
||||
idesc->id_blkno = dp->di_proplb;
|
||||
if (dp->di_flags & IC_PROPLIST_FRAG) {
|
||||
blksize = sblock.fs_fsize;
|
||||
idesc->id_numfrags = 1;
|
||||
} else {
|
||||
blksize = sblock.fs_bsize;
|
||||
idesc->id_numfrags = sblock.fs_frag;
|
||||
}
|
||||
bp = getdatablk(idesc->id_blkno, blksize);
|
||||
idesc->id_loc = 0;
|
||||
for (;;) {
|
||||
pl_descp = (struct proplist_desc1 *)(bp->b_un.b_buf + idesc->id_loc);
|
||||
if (pl_descp->pl_nextfsb > 0) {
|
||||
daddr_t save_blkno;
|
||||
|
||||
if (pl_descp->pl_nextfsb == badblkno) {
|
||||
pl_descp->pl_nextfsb = nextblk;
|
||||
dirty(bp);
|
||||
return (ALTERED);
|
||||
}
|
||||
save_blkno = pl_descp->pl_nextfsb;
|
||||
bp->b_flags &= ~B_INUSE;
|
||||
idesc->id_blkno = save_blkno;
|
||||
idesc->id_numfrags = sblock.fs_frag;
|
||||
blksize = sblock.fs_bsize;
|
||||
bp = getdatablk(save_blkno, blksize);
|
||||
idesc->id_loc = 0;
|
||||
continue;
|
||||
}
|
||||
idesc->id_loc += pl_descp->pl_nextentry;
|
||||
if (idesc->id_loc == blksize) {
|
||||
bp->b_flags &= ~B_INUSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (SKIP);
|
||||
}
|
||||
|
||||
#endif /* AFS_OSF_ENV */
|
@ -24,7 +24,7 @@
|
||||
|
||||
#define VICE
|
||||
|
||||
#if defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV)
|
||||
#if defined(AFS_SUN_ENV)
|
||||
#define AFS_NEWCG_ENV
|
||||
#else
|
||||
#undef AFS_NEWCG_ENV
|
||||
@ -37,17 +37,6 @@ extern vfscklogprintf();
|
||||
|
||||
#define DKTYPENAMES
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#include <sys/vnode.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -70,7 +59,6 @@ extern vfscklogprintf();
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#include <sys/file.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -552,13 +540,6 @@ setup(dev)
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
#ifdef AFS_OSF_ENV
|
||||
if (!fflag && !bflag && !nflag && !hotroot && sblock.fs_clean == FS_CLEAN
|
||||
&& !sblk.b_dirty) {
|
||||
pwarn("Clean file system - skipping fsck\n");
|
||||
return (FS_CLEAN);
|
||||
}
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
/*
|
||||
* allocate and initialize the necessary maps
|
||||
|
@ -24,9 +24,6 @@
|
||||
|
||||
#define VICE
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/fs.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#ifdef AFS_SUN5_ENV
|
||||
#include <sys/fs/ufs_fs.h>
|
||||
@ -36,7 +33,6 @@
|
||||
#else /* AFS_VFSINCL_ENV */
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
extern int around[9];
|
||||
extern int inside[9];
|
||||
|
@ -40,18 +40,6 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#define VICE /* allow us to put our changes in at will */
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#define AFS_NEWCG_ENV
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#include <sys/vnode.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -73,11 +61,10 @@
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#include "fsck.h"
|
||||
|
||||
#if defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV)
|
||||
#if defined(AFS_SUN_ENV)
|
||||
#define AFS_NEWCG_ENV
|
||||
#else
|
||||
#undef AFS_NEWCG_ENV
|
||||
|
@ -45,17 +45,6 @@
|
||||
|
||||
#include <sys/file.h>
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/inode.h>
|
||||
#include <ufs/fs.h>
|
||||
#define _BSD
|
||||
#define _KERNEL
|
||||
#include <ufs/dir.h>
|
||||
#undef _KERNEL
|
||||
#undef _BSD
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#include <sys/vnode.h>
|
||||
@ -83,7 +72,6 @@
|
||||
#endif
|
||||
#include <sys/fs.h>
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include "fsck.h"
|
||||
|
@ -675,11 +675,7 @@ h_Alloc_r(struct rx_connection *r_con)
|
||||
h_AddHostToAddrHashTable_r(host->z.host, host->z.port, host);
|
||||
|
||||
if (consolePort == 0) { /* find the portal number for console */
|
||||
#if defined(AFS_OSF_ENV)
|
||||
serverentry = getservbyname("ropcons", "");
|
||||
#else
|
||||
serverentry = getservbyname("ropcons", 0);
|
||||
#endif
|
||||
if (serverentry)
|
||||
consolePort = serverentry->s_port;
|
||||
else
|
||||
|
@ -864,7 +864,6 @@ ParseRights(char *arights)
|
||||
* AIX: sysconf() limit is real
|
||||
* HP-UX: sysconf() limit is real
|
||||
* IRIX: sysconf() limit is apparently NOT real -- too small
|
||||
* DUX: sysconf() limit is apparently NOT real -- too big
|
||||
* Linux: sysconf() limit is apparently NOT real -- too big
|
||||
* Solaris: no sysconf() limit
|
||||
*/
|
||||
|
@ -19,9 +19,6 @@
|
||||
#include <afs/afsint.h>
|
||||
|
||||
#if !defined(AFS_SGI_ENV)
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/fs.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -39,7 +36,6 @@
|
||||
#include <sys/fs.h>
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#endif /* AFS_SGI_ENV */
|
||||
#include <sys/file.h>
|
||||
#ifdef AFS_AIX_ENV
|
||||
|
@ -44,9 +44,6 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
|
||||
}
|
||||
#else
|
||||
#if !defined(AFS_SGI_ENV)
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/fs.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -67,7 +64,6 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
|
||||
#include <sys/fs.h>
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#include <sys/vnode.h>
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -78,11 +74,7 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
|
||||
#endif
|
||||
#endif
|
||||
#else /* AFS_VFSINCL_ENV */
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/inode.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#include <sys/inode.h>
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_SGI_ENV */
|
||||
#include <afs/osi_inode.h>
|
||||
@ -1001,7 +993,7 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
|
||||
#else
|
||||
if ((super.fs.fs_magic != FS_MAGIC)
|
||||
|| (super.fs.fs_ncg < 1)
|
||||
#if defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
|
||||
#if defined(AFS_SUN_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
|
||||
|| (super.fs.fs_cpg < 1)
|
||||
#else
|
||||
|| (super.fs.fs_cpg < 1 || super.fs.fs_cpg > MAXCPG)
|
||||
@ -1050,10 +1042,6 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
|
||||
#endif /* AFS_SUN5_ENV */
|
||||
i = c * super.fs.fs_ipg;
|
||||
e = i + super.fs.fs_ipg;
|
||||
#ifdef AFS_OSF_ENV
|
||||
dblk1 = fsbtodb(&super.fs, itod(&super.fs, i));
|
||||
if (OS_SEEK(pfd, (off_t) ((off_t) dblk1 * DEV_BSIZE), L_SET) == -1) {
|
||||
#else
|
||||
#if defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV)
|
||||
f1 = fsbtodb(&super.fs, itod(&super.fs, i));
|
||||
off = (offset_t) f1 << DEV_BSHIFT;
|
||||
@ -1062,7 +1050,6 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
|
||||
if (OS_SEEK(pfd, dbtob(fsbtodb(&super.fs, itod(&super.fs, i))), L_SET)
|
||||
== -1) {
|
||||
#endif /* AFS_SUN5_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#endif /* AFS_HPUX_ENV */
|
||||
Log("Error reading inodes for partition %s; run vfsck\n",
|
||||
partition);
|
||||
@ -1107,18 +1094,6 @@ ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
|
||||
i, p->di_vicep1, p->di_vicep2, p->di_vicep3, p->di_mode,
|
||||
p->di_size, p->di_nlink);
|
||||
#endif
|
||||
#ifdef AFS_OSF_ENV
|
||||
#ifdef AFS_3DISPARES
|
||||
/* Check to see if this inode is a pre-"OSF1 4.0D" inode */
|
||||
if ((p->di_uid || p->di_gid)
|
||||
&& !(p->di_flags & (IC_XUID | IC_XGID))) {
|
||||
Log("Found unconverted inode %d: Use 'fs_conv_dux40D convert' on partition %s\n", i, partition);
|
||||
goto out;
|
||||
}
|
||||
#else
|
||||
osi_Panic("Tru64 needs AFS_3DISPARES\n");
|
||||
#endif
|
||||
#endif
|
||||
#if defined(AFS_SUN5_ENV)
|
||||
/* if this is a pre-sol2.6 unconverted inode, bail out */
|
||||
{
|
||||
|
@ -39,10 +39,6 @@
|
||||
#endif
|
||||
|
||||
#if !defined(AFS_SGI_ENV)
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <sys/mount.h>
|
||||
#include <ufs/fs.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -60,7 +56,6 @@
|
||||
#include <sys/fs.h>
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#include <sys/file.h>
|
||||
#ifdef AFS_AIX_ENV
|
||||
#include <sys/vfs.h>
|
||||
@ -350,13 +345,6 @@ VCheckPartition(char *part, char *devname, int logging)
|
||||
#endif /* AFS_NAMEI_ENV */
|
||||
#endif /* !AFS_LINUX20_ENV && !AFS_NT40_ENV */
|
||||
|
||||
#if defined(AFS_DUX40_ENV) && !defined(AFS_NAMEI_ENV)
|
||||
if (status.st_ino != ROOTINO) {
|
||||
Log("%s is not a mounted file system; ignored.\n", part);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
VInitPartition(part, devname, status.st_dev);
|
||||
|
||||
return 0;
|
||||
@ -675,7 +663,7 @@ VAttachPartitions(void)
|
||||
return errors;
|
||||
}
|
||||
#endif
|
||||
#if defined(AFS_DUX40_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
|
||||
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
|
||||
int
|
||||
VAttachPartitions(void)
|
||||
{
|
||||
|
@ -51,13 +51,9 @@
|
||||
#endif
|
||||
#endif
|
||||
#else /* AFS_VFSINCL_ENV */
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/inode.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
|
||||
#include <sys/inode.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_SGI_ENV */
|
||||
#ifdef AFS_AIX_ENV
|
||||
|
@ -51,13 +51,9 @@
|
||||
#endif
|
||||
#endif
|
||||
#else /* AFS_VFSINCL_ENV */
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/inode.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
|
||||
#include <sys/inode.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_SGI_ENV */
|
||||
#ifdef AFS_AIX_ENV
|
||||
|
@ -23,9 +23,6 @@
|
||||
#include <ctype.h>
|
||||
#include <sys/param.h>
|
||||
#if !defined(AFS_SGI_ENV)
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/fs.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -38,7 +35,6 @@
|
||||
#include <sys/fs.h>
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#endif /* AFS_SGI_ENV */
|
||||
#include <sys/errno.h>
|
||||
#include <sys/stat.h>
|
||||
@ -105,9 +101,6 @@
|
||||
#include <afs/dir.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
extern void *calloc(), *realloc();
|
||||
#endif
|
||||
#include "salvage.h"
|
||||
int volumeId;
|
||||
int VolumeChanged; /* to satisfy library libdir use */
|
||||
|
@ -23,9 +23,6 @@
|
||||
#include <ctype.h>
|
||||
#include <sys/param.h>
|
||||
#if !defined(AFS_SGI_ENV)
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/fs.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -38,7 +35,6 @@
|
||||
#include <sys/fs.h>
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#endif /* AFS_SGI_ENV */
|
||||
#include <sys/errno.h>
|
||||
#include <sys/stat.h>
|
||||
@ -106,9 +102,6 @@
|
||||
#include <afs/dir.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
extern void *calloc(), *realloc();
|
||||
#endif
|
||||
#include "salvage.h"
|
||||
int volumeId;
|
||||
int VolumeChanged; /* to satisfy library libdir use */
|
||||
|
@ -119,13 +119,9 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
|
||||
#endif
|
||||
#endif
|
||||
#else /* AFS_VFSINCL_ENV */
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/inode.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
|
||||
#include <sys/inode.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_SGI_ENV */
|
||||
#ifdef AFS_AIX_ENV
|
||||
@ -192,9 +188,6 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
|
||||
|
||||
#define SALV_BUFFER_SIZE 1024
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
extern void *calloc();
|
||||
#endif
|
||||
static char *TimeStamp(char *buffer, size_t size, time_t clock, int precision);
|
||||
|
||||
|
||||
|
@ -45,9 +45,6 @@
|
||||
|
||||
#ifndef AFS_NT40_ENV
|
||||
#if !defined(AFS_SGI_ENV)
|
||||
#ifdef AFS_OSF_ENV
|
||||
#include <ufs/fs.h>
|
||||
#else /* AFS_OSF_ENV */
|
||||
#ifdef AFS_VFSINCL_ENV
|
||||
#define VFS
|
||||
#ifdef AFS_SUN5_ENV
|
||||
@ -65,7 +62,6 @@
|
||||
#include <sys/fs.h>
|
||||
#endif
|
||||
#endif /* AFS_VFSINCL_ENV */
|
||||
#endif /* AFS_OSF_ENV */
|
||||
#endif /* AFS_SGI_ENV */
|
||||
#endif /* !AFS_NT40_ENV */
|
||||
|
||||
@ -142,10 +138,6 @@ static volatile sig_atomic_t vol_disallow_salvsync = 0;
|
||||
*/
|
||||
static int vol_shutting_down = 0;
|
||||
|
||||
#ifdef AFS_OSF_ENV
|
||||
extern void *calloc(), *realloc();
|
||||
#endif
|
||||
|
||||
/* Forward declarations */
|
||||
static Volume *attach2(Error * ec, VolumeId volumeId, char *path,
|
||||
struct DiskPartition64 *partp, Volume * vp,
|
||||
|
@ -413,11 +413,7 @@ typedef struct VolumeDiskData {
|
||||
* this volume; it is bogus (left over from an aborted volume move,
|
||||
* for example). Note: if this flag is on, then inService should
|
||||
* be OFF--only the salvager checks this flag */
|
||||
#ifdef ALPHA_DUX40_ENV
|
||||
#define DONT_SALVAGE 0xE6
|
||||
#else /* ALPHA_DUX40_ENV */
|
||||
#define DONT_SALVAGE 0xE5
|
||||
#endif /* ALPHA_DUX40_ENV */
|
||||
byte dontSalvage; /* If this is on, then don't bother salvaging this volume */
|
||||
byte reserveb3;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user