1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
* Copyright by The HDF Group. *
3
* Copyright by the Board of Trustees of the University of Illinois. *
4
* All rights reserved. *
6
* This file is part of HDF5. The full HDF5 copyright notice, including *
7
* terms governing use, modification, and redistribution, is contained in *
8
* the files COPYING and Copyright.html. COPYING can be found at the root *
9
* of the source code distribution tree; Copyright.html can be found at the *
10
* root level of an installed copy of the electronic HDF5 document set and *
11
* is linked from the top-level documents page. It can also be found at *
12
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
13
* access to either file, you may request a copy from help@hdfgroup.org. *
14
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16
/*-------------------------------------------------------------------------
20
* Quincey Koziol <koziol@hdfgroup.org>
22
* Purpose: File mount property list class routines
24
*-------------------------------------------------------------------------
30
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
36
#include "H5private.h" /* Generic Functions */
37
#include "H5Eprivate.h" /* Error handling */
38
#include "H5Iprivate.h" /* IDs */
39
#include "H5Ppkg.h" /* Property lists */
46
/* ======================== File Mount properties ====================*/
47
/* Definition for whether absolute symlinks local to file. */
48
#define H5F_MNT_SYM_LOCAL_SIZE sizeof(hbool_t)
49
#define H5F_MNT_SYM_LOCAL_DEF FALSE
57
/********************/
58
/* Package Typedefs */
59
/********************/
62
/********************/
63
/* Local Prototypes */
64
/********************/
66
/* Property class callbacks */
67
static herr_t H5P_fmnt_reg_prop(H5P_genclass_t *pclass);
70
/*********************/
71
/* Package Variables */
72
/*********************/
74
/* File mount property list class library initialization object */
75
const H5P_libclass_t H5P_CLS_FMNT[1] = {{
76
"file mount", /* Class name for debugging */
77
&H5P_CLS_ROOT_g, /* Parent class ID */
78
&H5P_CLS_FILE_MOUNT_g, /* Pointer to class ID */
79
&H5P_LST_FILE_MOUNT_g, /* Pointer to default property list ID */
80
H5P_fmnt_reg_prop, /* Default property registration routine */
81
NULL, /* Class creation callback */
82
NULL, /* Class creation callback info */
83
NULL, /* Class copy callback */
84
NULL, /* Class copy callback info */
85
NULL, /* Class close callback */
86
NULL /* Class close callback info */
90
/*****************************/
91
/* Library Private Variables */
92
/*****************************/
96
/*-------------------------------------------------------------------------
97
* Function: H5P_fmnt_reg_prop
99
* Purpose: Register the file mount property list class's properties
101
* Return: Non-negative on success/Negative on failure
103
* Programmer: Quincey Koziol
105
*-------------------------------------------------------------------------
108
H5P_fmnt_reg_prop(H5P_genclass_t *pclass)
110
hbool_t local = H5F_MNT_SYM_LOCAL_DEF; /* Whether symlinks are local to file */
111
herr_t ret_value = SUCCEED; /* Return value */
113
FUNC_ENTER_NOAPI_NOINIT(H5P_fmnt_reg_prop)
115
/* Register property of whether symlinks is local to file */
116
if(H5P_register_real(pclass, H5F_MNT_SYM_LOCAL_NAME, H5F_MNT_SYM_LOCAL_SIZE, &local, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
117
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
120
FUNC_LEAVE_NOAPI(ret_value)
121
} /* end H5P_fmnt_reg_prop() */