/*-
* 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>
#include <time.h>
#endif
#include "db_int.h"
#include "common_ext.h"
/*
* __os_fileid --
* Return a unique identifier for a file.
*
* PUBLIC: int __os_fileid __P((DB_ENV *, const char *, int, u_int8_t *));
*/
int
const char *fname;
int timestamp;
{
size_t i;
u_int8_t *p;
/* Clear the buffer. */
/* Check for the unthinkable. */
return (EINVAL);
return (errno);
}
/*
* Use the inode first and in reverse order, hopefully putting the
* distinguishing information early in the string.
*/
*fidp++ = *--p;
*fidp++ = *--p;
if (timestamp) {
*fidp++ = *--p;
}
return (0);
}