Coverage Report

Created: 2026-11-23 00:10

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/hdf5/src/H5FDmulti_int.c
Line
Count
Source
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
 * Copyright by The HDF Group.                                               *
3
 * All rights reserved.                                                      *
4
 *                                                                           *
5
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
6
 * terms governing use, modification, and redistribution, is contained in    *
7
 * the LICENSE file, which can be found at the root of the source code       *
8
 * distribution tree, or in https://www.hdfgroup.org/licenses.               *
9
 * If you do not have access to either file, you may request a copy from     *
10
 * help@hdfgroup.org.                                                        *
11
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12
13
/*
14
 * Purpose:     Private routines for the multi VFD.
15
 *
16
 *              Necessary for using internal library routines, which are
17
 *              disallowed within the actual multi VFD code.
18
 *
19
 */
20
21
/****************/
22
/* Module Setup */
23
/****************/
24
25
#define H5FD_FRIEND /* Suppress error about including H5FDpkg   */
26
27
/***********/
28
/* Headers */
29
/***********/
30
31
#include "H5private.h"  /* Generic Functions                        */
32
#include "H5Eprivate.h" /* Error handling                           */
33
#include "H5Iprivate.h" /* IDs                                      */
34
#include "H5FDpkg.h"    /* File drivers                             */
35
36
#include "H5FDmulti_private.h" /* multi VFD */
37
38
/* The driver identification number, initialized at runtime */
39
hid_t H5FD_MULTI_id_g = H5I_INVALID_HID;
40
41
/*-------------------------------------------------------------------------
42
 * Function:    H5FD__multi_register
43
 *
44
 * Purpose:     Register the driver with the library.
45
 *
46
 * Return:      SUCCEED/FAIL
47
 *
48
 *-------------------------------------------------------------------------
49
 */
50
herr_t
51
H5FD__multi_register(void)
52
6
{
53
6
    herr_t ret_value = SUCCEED; /* Return value */
54
55
6
    FUNC_ENTER_PACKAGE
56
57
6
    if (H5I_VFL != H5I_get_type(H5FD_MULTI_id_g))
58
6
        if ((H5FD_MULTI_id_g = H5FD_register(&H5FD_multi_g, sizeof(H5FD_class_t), false)) < 0)
59
0
            HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "unable to register multi driver");
60
61
6
done:
62
6
    FUNC_LEAVE_NOAPI(ret_value)
63
6
} /* end H5FD__multi_register() */
64
65
/*---------------------------------------------------------------------------
66
 * Function:    H5FD__multi_unregister
67
 *
68
 * Purpose:     Reset library driver info.
69
 *
70
 * Returns:     SUCCEED (Can't fail)
71
 *
72
 *---------------------------------------------------------------------------
73
 */
74
herr_t
75
H5FD__multi_unregister(void)
76
6
{
77
6
    FUNC_ENTER_PACKAGE_NOERR
78
79
    /* Reset VFL ID */
80
6
    H5FD_MULTI_id_g = H5I_INVALID_HID;
81
82
6
    FUNC_LEAVE_NOAPI(SUCCEED)
83
6
} /* end H5FD_multi_unregister() */