blob: 8b766b588ca429232f470d976a6ef6e7521de30c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/** BEGIN COPYRIGHT BLOCK
* Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
* END COPYRIGHT BLOCK **/
/*
* dbsize.c - ldbm backend routine which returns the size (in bytes)
* that the database occupies on disk.
*/
#include "back-ldbm.h"
int
ldbm_db_size( Slapi_PBlock *pb )
{
struct ldbminfo *li;
unsigned int size;
int rc;
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
rc = dblayer_database_size(li, &size);
slapi_pblock_set( pb, SLAPI_DBSIZE, &size );
return rc;
}
|