summaryrefslogtreecommitdiffstats
path: root/src/H5B2stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5B2stat.c')
-rw-r--r--src/H5B2stat.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/H5B2stat.c b/src/H5B2stat.c
index a5301de..391d96d 100644
--- a/src/H5B2stat.c
+++ b/src/H5B2stat.c
@@ -71,6 +71,43 @@
/*-------------------------------------------------------------------------
+ * Function: H5B2_stat_info_2
+ *
+ * Purpose: Retrieve metadata statistics for a v2 B-tree
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Monday, March 6, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5B2_stat_info_2(H5B2_t *bt2, hid_t dxpl_id, H5B2_stat_t *info)
+{
+ H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B2_stat_info_2)
+
+ /* Check arguments. */
+ HDassert(info);
+
+ /* Set the shared v2 B-tree header's file context for this operation */
+ bt2->hdr->f = bt2->f;
+
+ /* Get the v2 B-tree header */
+ hdr = bt2->hdr;
+
+ /* Get information about the B-tree */
+ info->depth = hdr->depth;
+ info->nrecords = hdr->root.all_nrec;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5B2_stat_info_2() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5B2_stat_info
*
* Purpose: Retrieve metadata statistics for a v2 B-tree