/*
* 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>
-RCSID
- ("$Header$");
+#include <roken.h>
#include <sys/types.h>
#ifdef AFS_NT40_ENV
#include "volser.h"
#include "lockdata.h"
-#include <vsutils_prototypes.h>
-#include <lockprocs_prototypes.h>
+#include "vsutils_prototypes.h"
+#include "lockprocs_prototypes.h"
/* Finds an index in VLDB entry that matches the volume type, server, and partition.
* If type is zero, will match first index of ANY type (RW, BK, or RO).
- * If server is zero, will match first index of ANY server and partition
+ * If server is zero, will match first index of ANY server and partition
* Zero is a valid partition field.
*/
-int
-FindIndex(struct nvldbentry *entry, afs_int32 server, afs_int32 part, afs_int32 type)
+static int
+FindIndex(struct nvldbentry *entry, afs_uint32 server, afs_int32 part, afs_int32 type)
{
int e;
afs_int32 error = 0;
}
/* Changes the rw site only */
-void
-SetAValue(struct nvldbentry *entry, afs_int32 oserver, afs_int32 opart,
- afs_int32 nserver, afs_int32 npart, afs_int32 type)
+static void
+SetAValue(struct nvldbentry *entry, afs_uint32 oserver, afs_int32 opart,
+ afs_uint32 nserver, afs_int32 npart, afs_int32 type)
{
int e;
- afs_int32 error = 0;
e = FindIndex(entry, oserver, opart, type);
if (e == -1)
/* Changes the RW site only */
void
-Lp_SetRWValue(struct nvldbentry *entry, afs_int32 oserver, afs_int32 opart,
- afs_int32 nserver, afs_int32 npart)
+Lp_SetRWValue(struct nvldbentry *entry, afs_uint32 oserver, afs_int32 opart,
+ afs_uint32 nserver, afs_int32 npart)
{
SetAValue(entry, oserver, opart, nserver, npart, ITSRWVOL);
}
/* Changes the RO site only */
void
-Lp_SetROValue(struct nvldbentry *entry, afs_int32 oserver,
- afs_int32 opart, afs_int32 nserver, afs_int32 npart)
+Lp_SetROValue(struct nvldbentry *entry, afs_uint32 oserver,
+ afs_int32 opart, afs_uint32 nserver, afs_int32 npart)
{
SetAValue(entry, oserver, opart, nserver, npart, ITSROVOL);
}
/* Returns success if this server and partition matches the RW entry */
-int
-Lp_Match(afs_int32 server, afs_int32 part,
+int
+Lp_Match(afs_uint32 server, afs_int32 part,
struct nvldbentry *entry)
{
if (FindIndex(entry, server, part, ITSRWVOL) == -1)
}
/* Return the index of the RO entry (plus 1) if it exists, else return 0 */
-int
-Lp_ROMatch(afs_int32 server, afs_int32 part, struct nvldbentry *entry)
+int
+Lp_ROMatch(afs_uint32 server, afs_int32 part, struct nvldbentry *entry)
{
return (FindIndex(entry, server, part, ITSROVOL) + 1);
}
/* Return the index of the RW entry if it exists, else return -1 */
-int
+int
Lp_GetRwIndex(struct nvldbentry *entry)
{
return (FindIndex(entry, 0, 0, ITSRWVOL));
}
}
-int
+int
Lp_QScan(struct qHead *ahead, afs_int32 id, int *success, struct aqueue **elem)
{
struct aqueue *cptr;