stats_dbm.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1996-2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*
*
* Routines for dbm access.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <fcntl.h>
#include <libintl.h>
#include <time.h>
#include <string.h>
#include "stats.h"
#include <assert.h>
#include <ndbm.h>
void
{
char *tmpdir;
tmpdir = "/tmp";
return;
}
}
void
{
return;
((sizeof (buffy)) - (sizeof (".xxx"))))
return; /* No space for the file extensions */
}
void
{
return;
return;
}
fid_info *
{
return (NULL);
gettext("Cannot malloc memory for fid_info record"));
return (NULL);
}
return (NULL);
}
return (rc);
}
void
{
gettext("Cannot store fid info"));
return;
}
}
{
return (NULL);
gettext("Cannot malloc memory for mountinfo"));
return (NULL);
}
return (NULL);
}
return (rc);
}
void
{
gettext("Cannot store mount info"));
return;
}
}
void
{
}
{
}
{
}
/*
* count var will be non-zero only for the record type CACHEFS_LOG_MDCREATE
* and count can't be >2GB because it refers to the number of entries in
* the attribute cache file.
*/
{
char *cacheid;
int i;
/* look up any known data about this filegrp */
size = sizeof (struct attrcache_header);
/* align the structure */
}
/* if we haven't seen this filegrp yet */
/* filegrp frontfile directory */
}
/* high-water the given count (if any) with our known count */
/* set a bit for this file */
}
/* high-water our derived count with our known count */
/* account for the size of all known attrcache entries */
/* round to the ceiling block boundary */
/* sneaky :-) -- high-water fg_size, and make size the delta */
gettext("Cannot store attrcache info"));
}