afs_int32 *cid);
static afs_int32 nameToID(struct rx_call *call, namelist *aname, idlist *aid);
static afs_int32 idToName(struct rx_call *call, idlist *aid, namelist *aname, afs_int32 *cid);
+static afs_int32 IDToName(struct ubik_trans *at, afs_int32 aid,
+ char aname[PR_MAXNAMELEN]);
+static afs_int32 NameToID(struct ubik_trans *at, char aname[PR_MAXNAMELEN],
+ afs_int32 *aid);
static afs_int32 Delete(struct rx_call *call, afs_int32 aid, afs_int32 *cid);
static afs_int32 UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
struct PrUpdateEntry *uentry, afs_int32 *cid);
return PRSUCCESS;
}
+static afs_int32
+IDToName(struct ubik_trans *at, afs_int32 aid, char aname[PR_MAXNAMELEN])
+{
+ afs_int32 temp;
+ struct prentry tentry;
+ afs_int32 code;
+
+ temp = FindByID(at, aid);
+ if (temp == 0)
+ return PRNOENT;
+ code = pr_Read(at, 0, temp, (char *)&tentry, sizeof(tentry));
+ if (code)
+ return code;
+ strncpy(aname, tentry.name, PR_MAXNAMELEN);
+ return PRSUCCESS;
+}
+
+static afs_int32
+NameToID(struct ubik_trans *at, char aname[PR_MAXNAMELEN], afs_int32 *aid)
+{
+ afs_int32 temp;
+ struct prentry tentry;
+
+ temp = FindByName(at, aname, &tentry);
+ if (!temp)
+ return PRNOENT;
+ *aid = tentry.id;
+ return PRSUCCESS;
+}
+
afs_int32
SPR_Delete(struct rx_call *call, afs_int32 aid)
{
char aname[PR_MAXNAMELEN], struct prentry *tentryp);
extern afs_int32 AllocID(struct ubik_trans *at, afs_int32 flag,
afs_int32 *aid);
-extern afs_int32 IDToName(struct ubik_trans *at, afs_int32 aid,
- char aname[PR_MAXNAMELEN]);
-extern afs_int32 NameToID(struct ubik_trans *at,
- char aname[PR_MAXNAMELEN], afs_int32 *aid);
extern int IDCmp(const void *a, const void *b);
extern afs_int32 RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid,
afs_int32 *loc);
}
}
-afs_int32
-IDToName(struct ubik_trans *at, afs_int32 aid, char aname[PR_MAXNAMELEN])
-{
- afs_int32 temp;
- struct prentry tentry;
- afs_int32 code;
-
- temp = FindByID(at, aid);
- if (temp == 0)
- return PRNOENT;
- code = pr_Read(at, 0, temp, (char *)&tentry, sizeof(tentry));
- if (code)
- return code;
- strncpy(aname, tentry.name, PR_MAXNAMELEN);
- return PRSUCCESS;
-}
-
-afs_int32
-NameToID(struct ubik_trans *at, char aname[PR_MAXNAMELEN], afs_int32 *aid)
-{
- afs_int32 temp;
- struct prentry tentry;
-
- temp = FindByName(at, aname, &tentry);
- if (!temp)
- return PRNOENT;
- *aid = tentry.id;
- return PRSUCCESS;
-}
-
int
IDCmp(const void *a, const void *b)
{