Coverage Report

Created: 2026-06-08 06:15

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/hdf5/src/H5Pfmpl.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
 *
15
 * Created:   H5Pmtpl.c
16
 *
17
 * Purpose:   File mount property list class routines
18
 *
19
 *-------------------------------------------------------------------------
20
 */
21
22
/****************/
23
/* Module Setup */
24
/****************/
25
26
#include "H5Pmodule.h" /* This source code file is part of the H5P module */
27
28
/***********/
29
/* Headers */
30
/***********/
31
#include "H5private.h"  /* Generic Functions      */
32
#include "H5Eprivate.h" /* Error handling       */
33
#include "H5Fprivate.h" /* Files                */
34
#include "H5Ppkg.h"     /* Property lists       */
35
36
/****************/
37
/* Local Macros */
38
/****************/
39
40
/* ======================== File Mount properties ====================*/
41
/* Definition for whether absolute symlinks local to file. */
42
2
#define H5F_MNT_SYM_LOCAL_SIZE sizeof(bool)
43
#define H5F_MNT_SYM_LOCAL_DEF  false
44
45
/******************/
46
/* Local Typedefs */
47
/******************/
48
49
/********************/
50
/* Package Typedefs */
51
/********************/
52
53
/********************/
54
/* Local Prototypes */
55
/********************/
56
57
/* Property class callbacks */
58
static herr_t H5P__fmnt_reg_prop(H5P_genclass_t *pclass);
59
60
/*********************/
61
/* Package Variables */
62
/*********************/
63
64
/* File mount property list class library initialization object */
65
const H5P_libclass_t H5P_CLS_FMNT[1] = {{
66
    "file mount",        /* Class name for debugging     */
67
    H5P_TYPE_FILE_MOUNT, /* Class type                   */
68
69
    &H5P_CLS_ROOT_g,          /* Parent class                 */
70
    &H5P_CLS_FILE_MOUNT_g,    /* Pointer to class             */
71
    &H5P_CLS_FILE_MOUNT_ID_g, /* Pointer to class ID          */
72
    &H5P_LST_FILE_MOUNT_ID_g, /* Pointer to default property list ID */
73
    H5P__fmnt_reg_prop,       /* Default property registration routine */
74
75
    NULL, /* Class creation callback      */
76
    NULL, /* Class creation callback info */
77
    NULL, /* Class copy callback          */
78
    NULL, /* Class copy callback info     */
79
    NULL, /* Class close callback         */
80
    NULL  /* Class close callback info    */
81
}};
82
83
/*****************************/
84
/* Library Private Variables */
85
/*****************************/
86
87
/*******************/
88
/* Local Variables */
89
/*******************/
90
91
/* Property value defaults */
92
static const bool H5F_def_local_g = H5F_MNT_SYM_LOCAL_DEF; /* Whether symlinks are local to file */
93
94
/*-------------------------------------------------------------------------
95
 * Function:    H5P__fmnt_reg_prop
96
 *
97
 * Purpose:     Register the file mount property list class's properties
98
 *
99
 * Return:      Non-negative on success/Negative on failure
100
 *
101
 *-------------------------------------------------------------------------
102
 */
103
static herr_t
104
H5P__fmnt_reg_prop(H5P_genclass_t *pclass)
105
2
{
106
2
    herr_t ret_value = SUCCEED; /* Return value */
107
108
2
    FUNC_ENTER_PACKAGE
109
110
    /* Register property of whether symlinks is local to file */
111
2
    if (H5P__register_real(pclass, H5F_MNT_SYM_LOCAL_NAME, H5F_MNT_SYM_LOCAL_SIZE, &H5F_def_local_g, NULL,
112
2
                           NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
113
0
        HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class");
114
115
2
done:
116
2
    FUNC_LEAVE_NOAPI(ret_value)
117
2
} /* end H5P__fmnt_reg_prop() */