/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1996, 1997, 1998
* Sleepycat Software. All rights reserved.
*/
#include "config.h"
#ifndef lint
#endif /* not lint */
#ifndef NO_SYSTEM_INCLUDES
#include <errno.h>
#include <string.h>
#endif
#include "db_int.h"
#include "shqueue.h"
#include "log.h"
#include "common_ext.h"
/*
* log_register --
* Register a file name.
*/
int
const char *name;
{
char *fullname;
void *namep;
inserted = 0;
/* Check the arguments. */
return (EINVAL);
}
/* Get the log file id. */
return (ret);
/*
* See if we've already got this file in the log, finding the
* (maximum+1) in-use file id and some available file id (if we
* find an available fid, we'll use it, else we'll have to allocate
* one after the maximum that we found).
*/
continue;
}
goto found;
}
}
/* Fill in fnp structure. */
goto err;
else /* Allocate a new one. */
goto err;
/* Only do the insert if we allocated a new fnp. */
inserted = 1;
found: /* Log the registry. */
goto err;
goto err;
}
if (0) {
err: /*
* XXX
* We should grow the region.
*/
if (inserted)
}
return (ret);
}
/*
* log_unregister --
* Discard a registered file name.
*/
int
{
int ret;
ret = 0;
/* Find the entry in the log. */
break;
goto ret1;
}
/* Unlog the registry. */
goto ret1;
}
/*
* If more than 1 reference, just decrement the reference and return.
* Otherwise, free the name.
*/
/*
* Remove from the process local table. If this operation is taking
* place during recovery, then the logid was never added to the table,
* so do not remove it.
*/
return (ret);
}