Rename DInit to udisk_Init, and call it from the general
initialization sequence. udisk_begin can now assume that this
has been done.
Change-Id: I88f38b7a846b635e0c42f42cdf8c9005bb4bf62d
Reviewed-on: http://gerrit.openafs.org/4140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
static char *BufferData;
static struct buffer *newslot(struct ubik_dbase *adbase, afs_int32 afid,
afs_int32 apage);
-static int initd = 0;
#define BADFID 0xffffffff
static int DTrunc(struct ubik_trans *atrans, afs_int32 fid, afs_int32 length);
return 0;
}
-static int
-DInit(int abuffers)
+int
+udisk_Init(int abuffers)
{
/* Initialize the venus buffer system. */
int i;
struct ubik_trans *tt;
*atrans = (struct ubik_trans *)NULL;
- /* Make sure system is initialized before doing anything */
- if (!initd) {
- initd = 1;
- DInit(ubik_nBuffers);
- }
if (atype == UBIK_WRITETRANS) {
if (adbase->flags & DBWRITING)
return USYNC;
if (code < 0)
return code;
+ udisk_Init(ubik_nBuffers);
+
ubik_callPortal = myPort;
/* try to get an additional security object */
ubik_sc[0] = rxnull_NewServerSecurityObject();
/*\}*/
/*! \name disk.c */
+extern int udisk_Init(int nBUffers);
extern void udisk_Debug(struct ubik_debug *aparm);
extern int udisk_Invalidate(struct ubik_dbase *adbase, afs_int32 afid);
extern int udisk_read(struct ubik_trans *atrans, afs_int32 afile,