Prototyping and warning message reduction for the volser directory.
Adds physio.h and dumpstuff.h as internal header files,
Many error code variables are changed from being afs_int32, to the
'Error' typedef, to remove signed comparison errors.
Reviewed-on: http://gerrit.openafs.org/19
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
volint.ss.o: volint.ss.c ${INTINCLS}
volint.xdr.o: volint.xdr.c ${INTINCLS}
vsutils.o: vsutils.c ${VINCLS} ${RINCLS} ${INTINCLS}
-volmain.o: volmain.c ${VINCLS} ${RINCLS} AFS_component_version_number.c
+volmain.o: volmain.c ${VINCLS} ${RINCLS} ${INTINCLS} AFS_component_version_number.c
volprocs.o: volprocs.c ${VINCLS} ${RINCLS} ${INTINCLS}
dumpstuff.o: dumpstuff.c ${VINCLS} ${RINCLS} ${INTINCLS}
voldump.o: voldump.c ${VINCLS} ${RINCLS}
#include <afsconfig.h>
#include <afs/param.h>
-
#include <stdio.h>
+#include <stdlib.h>
+
#include <afs/afsutil.h>
#include <afs/com_err.h>
+#ifndef AFS_PTHREAD_ENV
+#include <afs/kautils.h>
+#include <rx/rxkad.h>
+#include <afs/auth.h>
+#include <afs/cellconfig.h>+
+#include <afs/cmd.h>
+#include <afs/vlserver.h>
+#include "volser.h"
+#endif
+
#ifndef AFS_PTHREAD_ENV
/*@printflike@*/ void
Log(const char *format, ...)
#include <afs/daemon_com.h>
#include <afs/fssync.h>
#include <afs/acl.h>
+#include <afs/com_err.h>
+#include <afs/vol_prototypes.h>
#include "volser.h"
#include "volint.h"
+#include "dumpstuff.h"
#ifndef AFS_NT40_ENV
#ifdef O_LARGEFILE
extern int DoLogging;
-/* This iod stuff is a silly little package to emulate the old qi_in stuff, which
- emulated the stdio stuff. There is a big assumption here, that the
- rx_Read will never be called directly, by a routine like readFile, when
- there is an old character that was pushed back with iod_ungetc. This
- is really bletchy, and is here for compatibility only. Eventually,
- we should define a volume format that doesn't require
- the pushing back of characters (i.e. characters should not double both
- as an end marker and a begin marker) */
-struct iod {
- struct rx_call *call; /* call to which to write, might be an array */
- int device; /* dump device ID for volume */
- int parentId; /* dump parent ID for volume */
- struct DiskPartition64 *dumpPartition; /* Dump partition. */
- struct rx_call **calls; /* array of pointers to calls */
- int ncalls; /* how many calls/codes in array */
- int *codes; /* one return code for each call */
- char haveOldChar; /* state for pushing back a character */
- char oldChar;
-};
-
/* Forward Declarations */
static int DumpDumpHeader(register struct iod *iodp, register Volume * vp,
static int
ReadShort(register struct iod *iodp, register unsigned short *sp)
{
- register b1, b0;
+ register int b1, b0;
b1 = iod_getc(iodp);
if (b1 == EOF)
return 0;
ReadString(register struct iod *iodp, register char *to, register int maxa)
{
register int c;
- int first = 1;
*to = '\0';
if (maxa == 0)
static int
ReadVolumeHeader(register struct iod *iodp, VolumeDiskData * vol)
{
- register tag;
+ register int tag;
afs_uint32 trash;
memset(vol, 0, sizeof(*vol));
while ((tag = iod_getc(iodp)) > D_MAX && tag != EOF) {
static int
DumpString(register struct iod *iodp, char tag, register char *s)
{
- register n;
+ register int n;
int code = 0;
code = iod_Write(iodp, &tag, 1);
if (code != 1)
ProcessIndex(Volume * vp, VnodeClass class, afs_int32 ** Bufp, int *sizep,
int del)
{
- int i, nVnodes, offset, code, index = 0;
+ int i, nVnodes, offset, code;
afs_int32 *Buf;
int cnt = 0;
int size;
{
afs_int32 vnodeNumber;
char buf[SIZEOF_LARGEDISKVNODE];
- register tag;
+ register int tag;
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
struct VnodeDiskObject oldvnode;
int idx;
static int
ReadDumpHeader(register struct iod *iodp, struct DumpHeader *hp)
{
- register tag;
+ register int tag;
afs_uint32 beginMagic;
if (iod_getc(iodp) != D_DUMPHEADER || !ReadInt32(iodp, &beginMagic)
|| !ReadInt32(iodp, (afs_uint32 *) & hp->version)
afs_int32 fromtime, register struct volintSize *v_size)
{
int code = 0;
- int UseLatestReadOnlyClone = 1;
+/* int UseLatestReadOnlyClone = 1; */
/* afs_int32 dumpTimes[2]; */
afs_uint64 addvar;
/* iodp->device = vp->device; */
--- /dev/null
+/*
+ * 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
+ */
+
+#ifndef _VOLSER_DUMPSTUFF_H
+#define _VOLSER_DUMPSTUFF_H
+
+/* This iod stuff is a silly little package to emulate the old qi_in stuff,
+ * which emulated the stdio stuff. There is a big assumption here, that the
+ * rx_Read will never be called directly, by a routine like readFile, when
+ * there is an old character that was pushed back with iod_ungetc. This
+ * is really bletchy, and is here for compatibility only. Eventually,
+ * we should define a volume format that doesn't require the pushing back
+ * of characters (i.e. characters should not double both as an end marker
+ * and a begin marker)
+ */
+struct iod {
+ struct rx_call *call; /* call to which to write, might be an array */
+ int device; /* dump device ID for volume */
+ int parentId; /* dump parent ID for volume */
+ struct DiskPartition64 *dumpPartition; /* Dump partition. */
+ struct rx_call **calls; /* array of pointers to calls */
+ int ncalls; /* how many calls/codes in array */
+ int *codes; /* one return code for each call */
+ char haveOldChar; /* state for pushing back a character */
+ char oldChar;
+};
+
+extern int DumpVolume(struct rx_call *call, Volume *vp, afs_int32, int);
+extern int DumpVolMulti(struct rx_call **, int, Volume *, afs_int32, int,
+ int *);
+extern int RestoreVolume(struct rx_call *, Volume *, int,
+ struct restoreCookie *);
+extern int SizeDumpVolume(struct rx_call *, Volume *, afs_int32, int,
+ struct volintSize *);
+
+#endif
afs_int32 nserver, afs_int32 npart, afs_int32 type)
{
int e;
- afs_int32 error = 0;
e = FindIndex(entry, oserver, opart, type);
if (e == -1)
#include <afs/dir.h>
#include <afs/ihandle.h>
#include "vol.h"
+#include "physio.h"
/* returns 0 on success, errno on failure */
int
SetSalvageDirHandle(DirHandle * dir, afs_int32 volume, afs_int32 device,
Inode inode)
{
- private SalvageCacheCheck = 1;
+ private int SalvageCacheCheck = 1;
memset(dir, 0, sizeof(DirHandle));
dir->dirh_volume = volume;
--- /dev/null
+/*
+ * 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
+ */
+
+#ifndef _VOLSER_PHYSIO_H
+#define _VOLSER_PHYSIO_H
+
+/* physio.c */
+extern void SetSalvageDirHandle(DirHandle *, afs_int32, afs_int32, Inode);
+extern void FidZap(DirHandle *);
+
+#endif
FILE *dumpfile;
afs_int32
-readvalue(size)
+readvalue(int size)
{
afs_int32 value, s;
int code;
}
char
-readchar()
+readchar(void)
{
char value;
int code;
- char *ptr;
value = '\0';
code = fread(&value, 1, 1, dumpfile);
char buf[BUFSIZE];
void
-readdata(buffer, size)
- char *buffer;
- afs_sfsize_t size;
+readdata(char *buffer, afs_sfsize_t size)
{
int code;
afs_int32 s;
}
afs_int32
-ReadDumpHeader(dh)
- struct DumpHeader *dh; /* Defined in dump.h */
+ReadDumpHeader(struct DumpHeader *dh)
{
- int code, i, done;
+ int i, done;
char tag, c;
afs_int32 magic;
};
afs_int32
-ReadVolumeHeader(count)
- afs_int32 count;
+ReadVolumeHeader(afs_int32 count)
{
struct volumeHeader vh;
- int code, i, done, entries;
+ int i, done;
char tag, c;
/* memset(&vh, 0, sizeof(vh)); */
#define MAXNAMELEN 256
afs_int32
-ReadVNode(count)
- afs_int32 count;
+ReadVNode(afs_int32 count)
{
struct vNode vn;
- int code, i, done, entries;
- char tag, c;
+ int code, i, done;
+ char tag;
char dirname[MAXNAMELEN], linkname[MAXNAMELEN], lname[MAXNAMELEN];
char parentdir[MAXNAMELEN], vflink[MAXNAMELEN];
char filename[MAXNAMELEN], fname[MAXNAMELEN];
* also be a mount point. If the volume is being restored to AFS, this
* will become a mountpoint. If not, it becomes a symlink to no-where.
*/
- int fid;
- afs_int32 size, s;
+ afs_int32 s;
/* Check if its vnode-file-link exists and create pathname
* of the symbolic link. If it doesn't exist,
static int
WorkerBee(struct cmd_syndesc *as, void *arock)
{
- int code = 0, c, len;
+ int code = 0, len;
afs_int32 type, count, vcount;
DIR *dirP, *dirQ;
struct dirent *dirE, *dirF;
- char fname[MAXNAMELEN], name[MAXNAMELEN], lname[MAXNAMELEN],
- mname[MAXNAMELEN];
+ char name[MAXNAMELEN];
char thisdir[MAXPATHLEN], *t;
struct DumpHeader dh; /* Defined in dump.h */
#if 0/*ndef HAVE_GETCWD*/ /* XXX enable when autoconf happens */
return (code);
}
-main(argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char **argv)
{
struct cmd_syndesc *ts;
- struct cmd_item *ti;
setlinebuf(stdout);
#include "viceinode.h"
#include <afs/afssyscalls.h>
#include "acl.h"
+#include <afs/dir.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
int
ReadHdr1(IHandle_t * ih, char *to, int size, u_int magic, u_int version)
{
- int bad = 0;
int code;
code = IH_IREAD(ih, 0, to, size);
{
struct VolumeHeader header;
struct VolumeDiskHeader diskHeader;
- struct afs_stat status, stat;
+ struct afs_stat status;
register int fd;
Volume *vp;
- IHandle_t *ih;
char headerName[1024];
afs_int32 n;
#ifndef AFS_NT40_ENV
struct afs_stat status;
#endif
- afs_sfsize_t size, tmpsize;
+ afs_sfsize_t size;
#ifdef AFS_AIX_ENV
#include <sys/statfs.h>
struct statfs tstatfs;
if (verbose)
fprintf(stderr, " howBig = %u, howMany = %u, fdh size = %u\n",
- howBig, howMany, size);
+ (unsigned int) howBig, (unsigned int) howMany,
+ (unsigned int) size);
#ifdef AFS_LARGEFILE_ENV
{
#include "partition.h"
#include "viceinode.h"
#include "vol.h"
+#include "volint.h"
+#include "volser.h"
+#include "physio.h"
+#include "volser_prototypes.h"
#ifdef AFS_RXOSD_SUPPORT
#include "rxosd.h"
#include "vol_osd.h"
}
}
if (m->verbose) {
- sprintf(m->line, "Volume %u has %u %s vnodes in volume %uu\n",
- V_parentId(vol), *length, class? "small":"large");
+ sprintf(m->line, "Volume %u has %u %s vnodes in volume %u\n",
+ V_parentId(vol), *length, class? "small":"large",
+ V_id(vol));
rx_Write(m->call, m->line, strlen(m->line));
}
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)&buf;
FdHandle_t *fdP = 0;
FdHandle_t *newfdP = 0;
- StreamHandle_t *newstream = 0;
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
struct VnodeExtract *e;
afs_uint64 size;
*/
IHandle_t *newh = 0;
IHandle_t *h = 0;
- FdHandle_t *infdP = 0;
- FdHandle_t *outfdP = 0;
- char *tbuf = malloc(2048);
#if defined(NEARINODE_HINT) && !defined(AFS_NAMEI_ENV)
Inode nearInode;
V_pref(vol,nearInode)
afs_uint64 offset, size;
afs_int32 class = vSmall;
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
+#if defined(NEARINODE_HINT) && !defined(AFS_NAMEI_ENV)
Inode nearInode = 0;
+#endif
AFSFid fid;
struct timeval now;
afs_uint32 newvN;
char symlink[32];
- TM_GetTimeOfDay(&now, 0);
+ FT_GetTimeOfDay(&now, 0);
fdP = IH_OPEN(vol->vnodeIndex[vSmall].handle);
if (!fdP) {
Log("split volume: error opening small vnode index of %u\n", V_id(vol));
split_volume(struct rx_call *call, Volume *vol, Volume *newvol,
afs_uint32 where, afs_int32 verbose)
{
- afs_int32 code = 0;
+ Error code = 0;
struct VnodeExtract *dirList = 0;
struct VnodeExtract *fileList = 0;
afs_uint64 blocks = 0;
#include <errno.h>
#include <afs/audit.h>
#include <afs/afsutil.h>
+#include <lwp.h>
+#include "volser.h"
+#include "volint.h"
+#include "volser_prototypes.h"
/*@printflike@*/ extern void Log(const char *format, ...);
/*@printflike@*/ extern void Abort(const char *format, ...);
#define N_SECURITY_OBJECTS 3
extern struct Lock localLock;
-extern struct volser_trans *TransList();
-#ifndef AFS_PTHREAD_ENV
-extern int (*vol_PollProc) ();
-extern int IOMGR_Poll();
-#endif
char *GlobalNameHack = NULL;
int hackIsIn = 0;
afs_int32 GlobalVolCloneId, GlobalVolParentId;
* if we're idle and there are no active transactions
*/
static void
-TryUnlock()
+TryUnlock(void)
{
/* if there are no running calls, and there are no active transactions, then
* it should be safe to release any partition locks we've accumulated */
volser_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
{
afs_uint32 rcode;
- void (*old) ();
+ void (*old) (int);
#ifndef AFS_LINUX20_ENV
old = signal(SIGSYS, SIG_IGN);
rxMaxMTU = atoi(argv[++code]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
- printf("rxMaxMTU %lu invalid; must be between %d-%d\n",
+ printf("rxMaxMTU %d invalid; must be between %d-%lu\n",
rxMaxMTU, RX_MIN_PACKET_SIZE,
RX_MAX_PACKET_DATA_SIZE);
exit(1);
#include <afs/acl.h>
#include "afs/audit.h"
#include <afs/dir.h>
+#include <afs/afsutil.h>
+#include <afs/vol_prototypes.h>
#include "volser.h"
#include "volint.h"
#include "volser_prototypes.h"
+#include "physio.h"
+#include "dumpstuff.h"
extern int DoLogging;
-extern struct volser_trans *FindTrans(), *NewTrans(), *TransList();
extern struct afsconf_dir *tdir;
-/* Needed by Irix. Leave, or include a header */
-extern char *volutil_PartitionName();
-
extern void LogError(afs_int32 errcode);
/* Forward declarations */
#endif
afs_int32 localTid = 1;
-afs_int32 VolPartitionInfo(), VolNukeVolume(), VolCreateVolume(),
-VolDeleteVolume(), VolClone();
-afs_int32 VolReClone(), VolTransCreate(), VolGetNthVolume(), VolGetFlags(),
-VolForward(), VolDump();
-afs_int32 VolRestore(), VolEndTrans(), VolSetForwarding(), VolGetStatus(),
-VolSetInfo(), VolGetName();
-afs_int32 VolListPartitions(), VolListOneVolume(),
-VolXListOneVolume(), VolXListVolumes();
-afs_int32 VolListVolumes(), XVolListPartitions(), VolMonitor(),
-VolSetIdsTypes(), VolSetDate(), VolSetFlags();
+
+static afs_int32 VolPartitionInfo(struct rx_call *, char *pname,
+ struct diskPartition64 *);
+static afs_int32 VolNukeVolume(struct rx_call *, afs_int32, afs_uint32);
+static afs_int32 VolCreateVolume(struct rx_call *, afs_int32, char *,
+ afs_int32, afs_uint32, afs_uint32 *,
+ afs_int32 *);
+static afs_int32 VolDeleteVolume(struct rx_call *, afs_int32);
+static afs_int32 VolClone(struct rx_call *, afs_int32, afs_uint32,
+ afs_int32, char *, afs_uint32 *);
+static afs_int32 VolReClone(struct rx_call *, afs_int32, afs_int32);
+static afs_int32 VolTransCreate(struct rx_call *, afs_uint32, afs_int32,
+ afs_int32, afs_int32 *);
+static afs_int32 VolGetNthVolume(struct rx_call *, afs_int32, afs_uint32 *,
+ afs_int32 *);
+static afs_int32 VolGetFlags(struct rx_call *, afs_int32, afs_int32 *);
+static afs_int32 VolSetFlags(struct rx_call *, afs_int32, afs_int32 );
+static afs_int32 VolForward(struct rx_call *, afs_int32, afs_int32,
+ struct destServer *destination, afs_int32,
+ struct restoreCookie *cookie);
+static afs_int32 VolDump(struct rx_call *, afs_int32, afs_int32, afs_int32);
+static afs_int32 VolRestore(struct rx_call *, afs_int32, afs_int32,
+ struct restoreCookie *);
+static afs_int32 VolEndTrans(struct rx_call *, afs_int32, afs_int32 *);
+static afs_int32 VolSetForwarding(struct rx_call *, afs_int32, afs_int32);
+static afs_int32 VolGetStatus(struct rx_call *, afs_int32,
+ struct volser_status *);
+static afs_int32 VolSetInfo(struct rx_call *, afs_int32, struct volintInfo *);
+static afs_int32 VolGetName(struct rx_call *, afs_int32, char **);
+static afs_int32 VolListPartitions(struct rx_call *, struct pIDs *);
+static afs_int32 XVolListPartitions(struct rx_call *, struct partEntries *);
+static afs_int32 VolListOneVolume(struct rx_call *, afs_int32, afs_uint32,
+ volEntries *);
+static afs_int32 VolXListOneVolume(struct rx_call *, afs_int32, afs_uint32,
+ volXEntries *);
+static afs_int32 VolListVolumes(struct rx_call *, afs_int32, afs_int32,
+ volEntries *);
+static afs_int32 VolXListVolumes(struct rx_call *, afs_int32, afs_int32,
+ volXEntries *);
+static afs_int32 VolMonitor(struct rx_call *, transDebugEntries *);
+static afs_int32 VolSetIdsTypes(struct rx_call *, afs_int32, char [],
+ afs_int32, afs_uint32, afs_uint32,
+ afs_uint32);
+static afs_int32 VolSetDate(struct rx_call *, afs_int32, afs_int32);
/* this call unlocks all of the partition locks we've set */
int
-VPFullUnlock()
+VPFullUnlock(void)
{
register struct DiskPartition64 *tp;
for (tp = DiskPartitionList; tp; tp = tp->next) {
return code;
}
-afs_int32
+static afs_int32
VolNukeVolume(struct rx_call *acid, afs_int32 apartID, afs_uint32 avolID)
{
char partName[50];
afs_int32 error;
+ Error verror;
register afs_int32 code;
struct Volume *tvp;
char caller[MAXKTCNAMELEN];
tvp = XAttachVolume(&error, avolID, apartID, V_VOLUPD);
code = nuke(partName, avolID);
if (tvp)
- VDetachVolume(&error, tvp);
+ VDetachVolume(&verror, tvp);
return code;
}
return code;
}
-afs_int32
+static afs_int32
VolCreateVolume(struct rx_call *acid, afs_int32 apart, char *aname,
afs_int32 atype, afs_uint32 aparent, afs_uint32 *avolid,
afs_int32 *atrans)
{
- afs_int32 error;
+ Error error;
register Volume *vp;
- afs_int32 junk; /* discardable error code */
+ Error junk; /* discardable error code */
afs_uint32 volumeID;
afs_int32 doCreateRoot = 1;
register struct volser_trans *tt;
return code;
}
-afs_int32
+static afs_int32
VolDeleteVolume(struct rx_call *acid, afs_int32 atrans)
{
register struct volser_trans *tt;
- afs_int32 error;
+ Error error;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(tdir, acid, caller))
/* make a clone of the volume associated with atrans, possibly giving it a new
* number (allocate a new number if *newNumber==0, otherwise use *newNumber
- * for the clone's id). The new clone is given the name newName. Finally, due to
- * efficiency considerations, if purgeId is non-zero, we purge that volume when doing
- * the clone operation. This may be useful when making new backup volumes, for instance
- * since the net result of a clone and a purge generally leaves many inode ref counts
- * the same, while doing them separately would result in far more iincs and idecs being
- * peformed (and they are slow operations).
+ * for the clone's id). The new clone is given the name newName. Finally,
+ * due to efficiency considerations, if purgeId is non-zero, we purge that
+ * volume when doing the clone operation. This may be useful when making
+ * new backup volumes, for instance since the net result of a clone and a
+ * purge generally leaves many inode ref counts the same, while doing them
+ * separately would result in far more iincs and idecs being peformed
+ * (and they are slow operations).
*/
/* for efficiency reasons, sometimes faster to piggyback a purge here */
afs_int32
return code;
}
-afs_int32
+static afs_int32
VolClone(struct rx_call *acid, afs_int32 atrans, afs_uint32 purgeId,
afs_int32 newType, char *newName, afs_uint32 *newNumber)
{
return code;
}
-afs_int32
+static afs_int32
VolReClone(struct rx_call *acid, afs_int32 atrans, afs_int32 cloneId)
{
register struct Volume *originalvp, *clonevp;
return code;
}
-afs_int32
+static afs_int32
VolTransCreate(struct rx_call *acid, afs_uint32 volume, afs_int32 partition,
afs_int32 iflags, afs_int32 *ttid)
{
register struct volser_trans *tt;
register Volume *tv;
- afs_int32 error, code;
+ afs_int32 error;
+ Error code;
afs_int32 mode;
char caller[MAXKTCNAMELEN];
return code;
}
-afs_int32
-VolGetNthVolume(struct rx_call *acid, afs_int32 aindex, afs_int32 *avolume,
+static afs_int32
+VolGetNthVolume(struct rx_call *acid, afs_int32 aindex, afs_uint32 *avolume,
afs_int32 *apart)
{
Log("1 Volser: GetNthVolume: Not yet implemented\n");
return code;
}
-afs_int32
+static afs_int32
VolGetFlags(struct rx_call *acid, afs_int32 atid, afs_int32 *aflags)
{
register struct volser_trans *tt;
return code;
}
-afs_int32
+static afs_int32
VolSetFlags(struct rx_call *acid, afs_int32 atid, afs_int32 aflags)
{
register struct volser_trans *tt;
register struct Volume *vp;
- afs_int32 error;
+ Error error;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(tdir, acid, caller))
return code;
}
-afs_int32
+static afs_int32
VolForward(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate,
struct destServer *destination, afs_int32 destTrans,
struct restoreCookie *cookie)
}
afs_int32
-SAFSVolDumpV2(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate, afs_int32 flags)
+SAFSVolDumpV2(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate,
+ afs_int32 flags)
{
afs_int32 code;
return code;
}
-afs_int32
-VolDump(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate, afs_int32 flags)
+static afs_int32
+VolDump(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate,
+ afs_int32 flags)
{
int code = 0;
register struct volser_trans *tt;
* Ha! No more helper process!
*/
afs_int32
-SAFSVolRestore(struct rx_call *acid, afs_int32 atrans, afs_int32 aflags,
+SAFSVolRestore(struct rx_call *acid, afs_int32 atrans, afs_int32 aflags,
struct restoreCookie *cookie)
{
afs_int32 code;
return code;
}
-afs_int32
-VolRestore(struct rx_call *acid, afs_int32 atrans, afs_int32 aflags,
- struct restoreCookie *cookie)
+static afs_int32
+VolRestore(struct rx_call *acid, afs_int32 atrans, afs_int32 aflags,
+ struct restoreCookie *cookie)
{
register struct volser_trans *tt;
register afs_int32 code, tcode;
return code;
}
-afs_int32
+static afs_int32
VolEndTrans(struct rx_call *acid, afs_int32 destTrans, afs_int32 *rcode)
{
register struct volser_trans *tt;
return code;
}
-afs_int32
+static afs_int32
VolSetForwarding(struct rx_call *acid, afs_int32 atid, afs_int32 anewsite)
{
register struct volser_trans *tt;
}
afs_int32
-SAFSVolGetStatus(struct rx_call *acid, afs_int32 atrans,
+SAFSVolGetStatus(struct rx_call *acid, afs_int32 atrans,
register struct volser_status *astatus)
{
afs_int32 code;
return code;
}
-afs_int32
-VolGetStatus(struct rx_call *acid, afs_int32 atrans,
- register struct volser_status *astatus)
+static afs_int32
+VolGetStatus(struct rx_call *acid, afs_int32 atrans,
+ register struct volser_status *astatus)
{
register struct Volume *tv;
register struct VolumeDiskData *td;
}
afs_int32
-SAFSVolSetInfo(struct rx_call *acid, afs_int32 atrans,
+SAFSVolSetInfo(struct rx_call *acid, afs_int32 atrans,
register struct volintInfo *astatus)
{
afs_int32 code;
return code;
}
-afs_int32
-VolSetInfo(struct rx_call *acid, afs_int32 atrans,
+static afs_int32
+VolSetInfo(struct rx_call *acid, afs_int32 atrans,
register struct volintInfo *astatus)
{
register struct Volume *tv;
register struct VolumeDiskData *td;
struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
- afs_int32 error;
+ Error error;
if (!afsconf_SuperUser(tdir, acid, caller))
return VOLSERBAD_ACCESS; /*not a super user */
return code;
}
-afs_int32
+static afs_int32
VolGetName(struct rx_call *acid, afs_int32 atrans, char **aname)
{
register struct Volume *tv;
/*this is a handshake to indicate that the next call will be SAFSVolRestore
* - a noop now !*/
afs_int32
-SAFSVolSignalRestore(struct rx_call *acid, char volname[], int volType,
+SAFSVolSignalRestore(struct rx_call *acid, char volname[], int volType,
afs_uint32 parentId, afs_uint32 cloneId)
{
return 0;
return code;
}
-afs_int32
+static afs_int32
VolListPartitions(struct rx_call *acid, struct pIDs *partIds)
{
char namehead[9];
- char i;
+ int i;
strcpy(namehead, "/vicep"); /*7 including null terminator */
return code;
}
-afs_int32
+static afs_int32
XVolListPartitions(struct rx_call *acid, struct partEntries *pEntries)
{
char namehead[9];
return 0;
}
+#ifdef AFS_DEMAND_ATTACH_FS
+
/**
* get struct Volume out of the fileserver.
*
return code;
}
+#endif
+
/**
* mode of volume list operation.
*/
vol_info_list_mode_t mode)
{
int code = -1;
- afs_int32 error;
+ Error error;
struct volser_trans *ttc = NULL;
struct Volume *fill_tv, *tv = NULL;
#ifdef AFS_DEMAND_ATTACH_FS
return code;
}
-afs_int32
+static afs_int32
VolListOneVolume(struct rx_call *acid, afs_int32 partid,
afs_uint32 volumeId, volEntries *volumeInfo)
{
volintInfo *pntr;
struct DiskPartition64 *partP;
char pname[9], volname[20];
- afs_int32 error = 0;
DIR *dirp;
afs_uint32 volid;
int found = 0;
return code;
}
-afs_int32
+static afs_int32
VolXListOneVolume(struct rx_call *a_rxCidP, afs_int32 a_partID,
afs_uint32 a_volID, volXEntries *a_volumeXInfoP)
{ /*SAFSVolXListOneVolume */
return code;
}
-afs_int32
+static afs_int32
VolListVolumes(struct rx_call *acid, afs_int32 partid, afs_int32 flags,
volEntries *volumeInfo)
{
struct DiskPartition64 *partP;
afs_int32 allocSize = 1000; /*to be changed to a larger figure */
char pname[9], volname[20];
- afs_int32 error = 0;
DIR *dirp;
afs_uint32 volid;
int code;
/*just volids are needed */
}
- drop:
pntr++;
volumeInfo->volEntries_len += 1;
if ((allocSize - volumeInfo->volEntries_len) < 5) {
return code;
}
-afs_int32
+static afs_int32
VolXListVolumes(struct rx_call *a_rxCidP, afs_int32 a_partID,
afs_int32 a_flags, volXEntries *a_volumeXInfoP)
{ /*SAFSVolXListVolumes */
struct DiskPartition64 *partP; /*Ptr to partition */
afs_int32 allocSize = 1000; /*To be changed to a larger figure */
char pname[9], volname[20]; /*Partition, volume names */
- afs_int32 error = 0; /*Return code */
DIR *dirp; /*Partition directory ptr */
afs_uint32 volid; /*Current volume ID */
int code;
xInfoP->volid = volid;
}
- drop:
/*
* Bump the pointer in the data area we're building, along with
* the count of the number of entries it contains.
return code;
}
-afs_int32
+static afs_int32
VolMonitor(struct rx_call *acid, transDebugEntries *transInfo)
{
transDebugInfo *pntr;
}
afs_int32
-SAFSVolSetIdsTypes(struct rx_call *acid, afs_int32 atid, char name[], afs_int32 type, afs_uint32 pId, afs_uint32 cloneId, afs_uint32 backupId)
+SAFSVolSetIdsTypes(struct rx_call *acid, afs_int32 atid, char name[],
+ afs_int32 type, afs_uint32 pId, afs_uint32 cloneId,
+ afs_uint32 backupId)
{
afs_int32 code;
return code;
}
-afs_int32
-VolSetIdsTypes(struct rx_call *acid, afs_int32 atid, char name[], afs_int32 type, afs_uint32 pId, afs_uint32 cloneId, afs_uint32 backupId)
+static afs_int32
+VolSetIdsTypes(struct rx_call *acid, afs_int32 atid, char name[],
+ afs_int32 type, afs_uint32 pId, afs_uint32 cloneId,
+ afs_uint32 backupId)
{
struct Volume *tv;
- afs_int32 error = 0;
+ Error error = 0;
register struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
return code;
}
-afs_int32
+static afs_int32
VolSetDate(struct rx_call *acid, afs_int32 atid, afs_int32 cdate)
{
struct Volume *tv;
- afs_int32 error = 0;
+ Error error = 0;
register struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
}
afs_int32
-SAFSVolSplitVolume(struct rx_call *acall, afs_uint32 vid, afs_uint32 new,
+SAFSVolSplitVolume(struct rx_call *acall, afs_uint32 vid, afs_uint32 new,
afs_uint32 where, afs_int32 verbose)
{
#if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV)
- afs_int32 code, code2;
+ Error code, code2;
Volume *vol=0, *newvol=0;
struct volser_trans *tt = 0, *tt2 = 0;
char caller[MAXKTCNAMELEN];
struct ubik_client;
extern afs_uint32 vsu_GetVolumeID(char *astring, struct ubik_client *acstruct, afs_int32 *errp);
extern int vsu_ExtractName(char rname[], char name[]);
-extern afs_int32 vsu_ClientInit(int noAuthFlag, char *confDir, char *cellName, afs_int32 sauth, struct ubik_client **uclientp, int (*secproc)());
+extern afs_int32 vsu_ClientInit(int noAuthFlag, char *confDir,
+ char *cellName, afs_int32 sauth,
+ struct ubik_client **uclientp,
+ int (*secproc)(struct rx_securityClass *, afs_int32));
extern void vsu_SetCrypt(int cryptflag);
#endif /* _VOLSER_ */
#define _VOLSER_PROTOTYPES_H
/* common.c */
+#ifndef AFS_PTHREAD_ENV
+extern void Log(const char *, ...);
+#endif
+extern void InitErrTabs(void);
+
+/* vol_split.c */
+extern afs_int32 split_volume(struct rx_call *, Volume *, Volume *,
+ afs_uint32, afs_int32);
+
+/* voltrans.c */
+extern struct volser_trans *FindTrans(afs_int32);
+extern struct volser_trans *NewTrans(afs_int32, afs_int32);
+extern struct volser_trans *TransList(void);
+extern afs_int32 DeleteTrans(struct volser_trans *atrans, afs_int32 lock);
+extern afs_int32 TRELE (struct volser_trans *);
+
+/* volprocs.c */
+extern int VPFullUnlock(void);
+
+/* voltrans.c */
+extern afs_int32 GCTrans(void);
/* vsprocs.c */
struct nvldbentry;
extern void dump_sig_handler(int x);
extern int UV_DumpVolume(afs_uint32 afromvol, afs_int32 afromserver,
afs_int32 afrompart, afs_int32 fromdate,
- afs_int32(*DumpFunction) (), char *rock, afs_int32 flags);
+ afs_int32(*DumpFunction) (struct rx_call *, void *),
+ void *rock, afs_int32 flags);
extern int UV_RestoreVolume(afs_int32 toserver, afs_int32 topart,
- afs_uint32 tovolid, char tovolname[], int restoreflags,
- afs_int32(*WriteData) (), char *rock);
-extern int UV_RestoreVolume2(afs_int32 toserver, afs_int32 topart, afs_uint32 tovolid,
- afs_int32 toparentid, char tovolname[], int flags,
- afs_int32(*WriteData) (), char *rock);
+ afs_uint32 tovolid, char tovolname[],
+ int restoreflags,
+ afs_int32(*WriteData) (struct rx_call *, void *),
+ void *rock);
+extern int UV_RestoreVolume2(afs_int32 toserver, afs_int32 topart,
+ afs_uint32 tovolid, afs_int32 toparentid,
+ char tovolname[], int flags,
+ afs_int32(*WriteData) (struct rx_call *, void *),
+ void *rock);
extern int UV_LockRelease(afs_uint32 volid);
-extern int UV_AddSite(afs_int32 server, afs_int32 part, afs_uint32 volid, afs_int32 valid);
+extern int UV_AddSite(afs_int32 server, afs_int32 part, afs_uint32 volid,
+ afs_int32 valid);
extern int UV_RemoveSite(afs_int32 server, afs_int32 part, afs_uint32 volid);
extern int UV_ChangeLocation(afs_int32 server, afs_int32 part,
afs_uint32 volid);
afs_uint32 acloneid, char *aname, int flags);
extern int UV_DumpClonedVolume(afs_uint32 afromvol, afs_int32 afromserver,
afs_int32 afrompart, afs_int32 fromdate,
- afs_int32(*DumpFunction) (), char *rock,
- afs_int32 flags);
+ afs_int32(*DumpFunction)
+ (struct rx_call *, void *),
+ void *rock, afs_int32 flags);
extern int UV_GetSize(afs_uint32 afromvol, afs_int32 afromserver,
afs_int32 afrompart, afs_int32 fromdate,
struct volintSize *vol_size);
#include <afs/vnode.h>
#include <afs/volume.h>
+#include "volint.h"
#include "volser.h"
-
-/*@printflike@*/ extern void Log(const char *format, ...);
+#include "volser_prototypes.h"
static struct volser_trans *allTrans = 0;
static afs_int32 transCounter = 1;
DeleteTrans(register struct volser_trans *atrans, afs_int32 lock)
{
register struct volser_trans *tt, **lt;
- afs_int32 error;
+ Error error;
if (lock) VTRANS_LOCK;
if (atrans->refCount > 1) {
#define OLDTRANSWARN 300 /* seconds */
static int GCDeletes = 0;
afs_int32
-GCTrans()
+GCTrans(void)
{
register struct volser_trans *tt, *nt;
afs_int32 now;
/*return the head of the transaction list */
struct volser_trans *
-TransList()
+TransList(void)
{
return (allTrans);
}
}
static void
-qGet(struct tqHead *ahead, afs_int32 *volid)
+qGet(struct tqHead *ahead, afs_uint32 *volid)
{
struct tqElem *tmp;
/* function invoked by UV_RestoreVolume, reads the data from rx_trx_stream and
* writes it out to the volume. */
afs_int32
-WriteData(struct rx_call *call, char *rock)
+WriteData(struct rx_call *call, void *rock)
{
- char *filename;
+ char *filename = (char *) rock;
usd_handle_t ufd;
long blksize;
afs_int32 error, code;
error = 0;
- filename = rock;
if (!filename || !*filename) {
usd_StandardInput(&ufd);
blksize = 4096;
}
afs_int32
-DumpFunction(struct rx_call *call, char *filename)
+DumpFunction(struct rx_call *call, void *rock)
{
+ char *filename = (char *)rock;
usd_handle_t ufd; /* default is to stdout */
afs_int32 error = 0, code;
afs_hyper_t size;
}
static void
-DisplayFormat(pntr, server, part, totalOK, totalNotOK, totalBusy, fast,
- longlist, disp)
- volintInfo *pntr;
- afs_int32 server, part;
- int *totalOK, *totalNotOK, *totalBusy;
- int fast, longlist, disp;
+DisplayFormat(volintInfo *pntr, afs_int32 server, afs_int32 part,
+ int *totalOK, int *totalNotOK, int *totalBusy, int fast,
+ int longlist, int disp)
{
char pname[10];
*------------------------------------------------------------------------*/
static void
-XDisplayFormat(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
- a_totalBusyP, a_fast, a_int32, a_showProblems)
- volintXInfo *a_xInfoP;
- afs_int32 a_servID;
- afs_int32 a_partID;
- int *a_totalOKP;
- int *a_totalNotOKP;
- int *a_totalBusyP;
- int a_fast;
- int a_int32;
- int a_showProblems;
-
+XDisplayFormat(volintXInfo *a_xInfoP, afs_int32 a_servID, afs_int32 a_partID,
+ int *a_totalOKP, int *a_totalNotOKP, int *a_totalBusyP,
+ int a_fast, int a_int32, int a_showProblems)
{ /*XDisplayFormat */
char pname[10];
*------------------------------------------------------------------------*/
static void
-XDisplayFormat2(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
- a_totalBusyP, a_fast, a_int32, a_showProblems)
- volintXInfo *a_xInfoP;
- afs_int32 a_servID;
- afs_int32 a_partID;
- int *a_totalOKP;
- int *a_totalNotOKP;
- int *a_totalBusyP;
- int a_fast;
- int a_int32;
- int a_showProblems;
-
+XDisplayFormat2(volintXInfo *a_xInfoP, afs_int32 a_servID, afs_int32 a_partID,
+ int *a_totalOKP, int *a_totalNotOKP, int *a_totalBusyP,
+ int a_fast, int a_int32, int a_showProblems)
{ /*XDisplayFormat */
if (a_fast) {
/*
#ifdef FULL_LISTVOL_SWITCH
static void
-DisplayFormat2(server, partition, pntr)
- long server, partition;
- volintInfo *pntr;
+DisplayFormat2(long server, long partition, volintInfo *pntr)
{
static long server_cache = -1, partition_cache = -1;
static char hostname[256], address[32], pname[16];
}
static void
-DisplayVolumes2(server, partition, pntr, count)
- volintInfo *pntr;
- long server, partition, count;
+DisplayVolumes2(long server, long partition, volintInfo *pntr, long count)
{
long i;
#endif /* FULL_LISTVOL_SWITCH */
static void
-DisplayVolumes(server, part, pntr, count, longlist, fast, quiet)
- afs_int32 server, part;
- volintInfo *pntr;
- afs_int32 count, longlist, fast;
- int quiet;
+DisplayVolumes(afs_int32 server, afs_int32 part, volintInfo *pntr,
+ afs_int32 count, afs_int32 longlist, afs_int32 fast,
+ int quiet)
{
int totalOK, totalNotOK, totalBusy, i;
afs_uint32 volid = 0;
*------------------------------------------------------------------------*/
static void
-XDisplayVolumes(a_servID, a_partID, a_xInfoP, a_count, a_int32, a_fast,
- a_quiet)
- afs_int32 a_servID;
- afs_int32 a_partID;
- volintXInfo *a_xInfoP;
- afs_int32 a_count;
- afs_int32 a_int32;
- afs_int32 a_fast;
- int a_quiet;
-
+XDisplayVolumes(afs_int32 a_servID, afs_int32 a_partID, volintXInfo *a_xInfoP,
+ afs_int32 a_count, afs_int32 a_int32, afs_int32 a_fast,
+ int a_quiet)
{ /*XDisplayVolumes */
int totalOK; /*Total OK volumes */
*------------------------------------------------------------------------*/
static void
-XDisplayVolumes2(a_servID, a_partID, a_xInfoP, a_count, a_int32, a_fast,
- a_quiet)
- afs_int32 a_servID;
- afs_int32 a_partID;
- volintXInfo *a_xInfoP;
- afs_int32 a_count;
- afs_int32 a_int32;
- afs_int32 a_fast;
- int a_quiet;
-
+XDisplayVolumes2(afs_int32 a_servID, afs_int32 a_partID, volintXInfo *a_xInfoP,
+ afs_int32 a_count, afs_int32 a_int32, afs_int32 a_fast,
+ int a_quiet)
{ /*XDisplayVolumes */
int totalOK; /*Total OK volumes */
/* set <server> and <part> to the correct values depending on
* <voltype> and <entry> */
static void
-GetServerAndPart(entry, voltype, server, part, previdx)
- struct nvldbentry *entry;
- afs_int32 *server, *part;
- int voltype;
- int *previdx;
+GetServerAndPart(struct nvldbentry *entry, int voltype, afs_int32 *server,
+ afs_int32 *part, int *previdx)
{
int i, istart, vtype;
*------------------------------------------------------------------------*/
static void
-XVolumeStats(a_xInfoP, a_entryP, a_srvID, a_partID, a_volType)
- volintXInfo *a_xInfoP;
- struct nvldbentry *a_entryP;
- afs_int32 a_srvID;
- afs_int32 a_partID;
- int a_volType;
-
+XVolumeStats(volintXInfo *a_xInfoP, struct nvldbentry *a_entryP,
+ afs_int32 a_srvID, afs_int32 a_partID, int a_volType)
{ /*XVolumeStats */
int totalOK, totalNotOK, totalBusy; /*Dummies - we don't really count here */
SetFields(register struct cmd_syndesc *as, void *arock)
{
struct nvldbentry entry;
- afs_int32 vcode = 0;
volintInfo info;
afs_uint32 volid;
afs_int32 code, err;
return 0;
}
+#if 0
static afs_int32
-DeleteAll(entry)
- struct nvldbentry *entry;
+DeleteAll(struct nvldbentry *entry)
{
int i;
afs_int32 error, code, curserver, curpart;
}
return error;
}
+#endif
static int
DeleteVolume(struct cmd_syndesc *as, void *arock)
}
#define TESTM 0 /* set for move space tests, clear for production */
-static
+static int
MoveVolume(register struct cmd_syndesc *as, void *arock)
{
return 0;
}
-static
-DumpVolume(register struct cmd_syndesc *as, void *arock)
+static int
+DumpVolumeCmd(register struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
afs_int32 aserver, apart, voltype, fromdate = 0, code, err, i, flags;
#define TS_NEW 3
static int
-RestoreVolume(register struct cmd_syndesc *as, void *arock)
+RestoreVolumeCmd(register struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid, aparentid;
afs_int32 aserver, apart, code, vcode, err;
}
static int
-CompareVolName(p1, p2)
- char *p1, *p2;
+CompareVolName(const void *p1, const void *p2)
{
volintInfo *arg1, *arg2;
*------------------------------------------------------------------------*/
static int
-XCompareVolName(a_obj1P, a_obj2P)
- char *a_obj1P, *a_obj2P;
-
+XCompareVolName(const void *a_obj1P, const void *a_obj2P)
{ /*XCompareVolName */
return (strcmp
} /*XCompareVolName */
static int
-CompareVolID(p1, p2)
- char *p1, *p2;
+CompareVolID(const void *p1, const void *p2)
{
volintInfo *arg1, *arg2;
*------------------------------------------------------------------------*/
static int
-XCompareVolID(a_obj1P, a_obj2P)
- char *a_obj1P, *a_obj2P;
-
+XCompareVolID(const void *a_obj1P, const void *a_obj2P)
{ /*XCompareVolID */
afs_int32 id1, id2; /*Volume IDs we're comparing */
* As advertised.
*------------------------------------------------------------------------*/
-static
+static int
ListVolumes(register struct cmd_syndesc *as, void *arock)
{
afs_int32 apart, int32list, fast;
}
-static
-VolumeInfoCmd(name)
- char *name;
+static int
+VolumeInfoCmd(char *name)
{
struct nvldbentry entry;
afs_int32 vcode;
static int
-CompareVldbEntryByName(p1, p2)
- char *p1, *p2;
+CompareVldbEntryByName(const void *p1, const void *p2)
{
struct nvldbentry *arg1, *arg2;
}
/*
-static int CompareVldbEntry(p1,p2)
-char *p1,*p2;
+static int CompareVldbEntry(char *p1, char *p2)
{
struct nvldbentry *arg1,*arg2;
int i;
int seenprefix, seenxprefix, exclude, ex, exp, noaction;
afs_int32 totalBack = 0;
afs_int32 totalFail = 0;
- int previdx = -1, error, same;
- int comp = 0;
+ int previdx = -1;
+ int error;
+ int same = 0;
struct cmd_item *ti;
- char *ccode;
int match = 0;
memset(&attributes, 0, sizeof(struct VldbListByAttributes));
UnlockVLDB(register struct cmd_syndesc *as, void *arock)
{
afs_int32 apart;
- afs_int32 aserver = NULL;
+ afs_int32 aserver = 0;
afs_int32 code;
afs_int32 vcode;
struct VldbListByAttributes attributes;
}
int
-osi_audit()
+osi_audit(void)
{
/* this sucks but it works for now.
*/
#include "AFS_component_version_number.c"
-main(argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char **argv)
{
register afs_int32 code;
"force a complete release");
COMMONPARMS;
- ts = cmd_CreateSyntax("dump", DumpVolume, NULL, "dump a volume");
+ ts = cmd_CreateSyntax("dump", DumpVolumeCmd, NULL, "dump a volume");
cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
cmd_AddParm(ts, "-time", CMD_SINGLE, CMD_OPTIONAL, "dump from time");
cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "dump file");
"omit unchanged directories from an incremental dump");
COMMONPARMS;
- ts = cmd_CreateSyntax("restore", RestoreVolume, NULL, "restore a volume");
+ ts = cmd_CreateSyntax("restore", RestoreVolumeCmd, NULL,
+ "restore a volume");
cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of volume to be restored");
#include <rx/rxkad.h>
#include <afs/kautils.h>
#include <afs/cmd.h>
+#include <afs/ihandle.h>
+#ifdef AFS_NT40_ENV
+#include <afs/ntops.h>
+#endif
+#include <afs/vnode.h>
+#include <afs/volume.h>
#include <errno.h>
#define ERRCODE_RANGE 8 /* from error_table.h */
#define CLOCKSKEW 2 /* not really skew, but resolution */
*/
int
UV_DumpVolume(afs_uint32 afromvol, afs_int32 afromserver, afs_int32 afrompart,
- afs_int32 fromdate, afs_int32(*DumpFunction) (), char *rock,
+ afs_int32 fromdate,
+ afs_int32(*DumpFunction) (struct rx_call *, void *), void *rock,
afs_int32 flags)
{
struct rx_connection *fromconn = (struct rx_connection *)0;
int
UV_DumpClonedVolume(afs_uint32 afromvol, afs_int32 afromserver,
afs_int32 afrompart, afs_int32 fromdate,
- afs_int32(*DumpFunction) (), char *rock, afs_int32 flags)
+ afs_int32(*DumpFunction) (struct rx_call *, void *),
+ void *rock, afs_int32 flags)
{
struct rx_connection *fromconn = (struct rx_connection *)0;
struct rx_call *fromcall = (struct rx_call *)0;
afs_int32 fromtid = 0, rxError = 0, rcode = 0;
afs_int32 clonetid = 0;
- afs_int32 code = 0, vcode = 0, error = 0;
+ afs_int32 code = 0, error = 0;
afs_uint32 clonevol = 0;
char vname[64];
time_t tmv = fromdate;
int
UV_RestoreVolume2(afs_int32 toserver, afs_int32 topart, afs_uint32 tovolid,
afs_int32 toparentid, char tovolname[], int flags,
- afs_int32(*WriteData) (), char *rock)
+ afs_int32(*WriteData) (struct rx_call *, void *),
+ void *rock)
{
struct rx_connection *toconn, *tempconn;
struct rx_call *tocall;
int
UV_RestoreVolume(afs_int32 toserver, afs_int32 topart, afs_uint32 tovolid,
- char tovolname[], int flags, afs_int32(*WriteData) (),
- char *rock)
+ char tovolname[], int flags,
+ afs_int32(*WriteData) (struct rx_call *, void *),
+ void *rock)
{
return UV_RestoreVolume2(toserver, topart, tovolid, 0, tovolname, flags,
WriteData, rock);
#include <afs/stds.h>
#include <string.h>
+#include <ctype.h>
#ifdef AFS_NT40_ENV
#include <fcntl.h>
#include <winsock2.h>
*/
afs_int32
vsu_ClientInit(int noAuthFlag, char *confDir, char *cellName, afs_int32 sauth,
- struct ubik_client **uclientp, int (*secproc)())
+ struct ubik_client **uclientp,
+ int (*secproc)(struct rx_securityClass *, afs_int32))
{
return ugen_ClientInit(noAuthFlag, confDir, cellName, sauth, uclientp,
secproc, "vsu_ClientInit", vsu_rxkad_level,
extern int VLDB_IsSameAddrs(afs_int32 serv1, afs_int32 serv2, afs_int32 *errorp);
extern void vsu_SetCrypt(int cryptflag);
extern afs_int32 vsu_ClientInit(int noAuthFlag, char *confDir, char *cellName, afs_int32 sauth,
- struct ubik_client **uclientp, int (*secproc)());
+ struct ubik_client **uclientp, int (*secproc)(struct rx_securityClass *, afs_int32));
extern int vsu_ExtractName(char rname[], char name[]);
extern afs_uint32 vsu_GetVolumeID(char *astring, struct ubik_client *acstruct, afs_int32 *errp);
#endif