summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-04-05 02:13:44 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-04-05 02:13:44 (GMT)
commit8c92019eb0fa456de911f1a122c94dbf17076dcc (patch)
tree58d8190add78375150c59e0c1e67769f1c18cb15
parent66ca98ad23e25b8bac13cdc6f772966b3cebe01b (diff)
parent3099afddc7723b6c46c800d606ebe02b40b84e1b (diff)
downloadhdf5-inactive/rados_vol.zip
hdf5-inactive/rados_vol.tar.gz
hdf5-inactive/rados_vol.tar.bz2
Merge pull request #1641 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:feature/rados_vol to feature/rados_volinactive/rados_vol
* commit '3099afddc7723b6c46c800d606ebe02b40b84e1b': Fixed a missing prototype. Fix typo in cmp function Added a cmp function for the RADOS VOL connector.
-rw-r--r--src/H5VLrados.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/H5VLrados.c b/src/H5VLrados.c
index 1fa7c9a..6a70acb 100644
--- a/src/H5VLrados.c
+++ b/src/H5VLrados.c
@@ -96,6 +96,7 @@ typedef struct H5VL_rados_select_chunk_info_t {
* Prototypes
*/
static void *H5VL_rados_info_copy(const void *_old_info);
+static herr_t H5VL_rados_info_cmp(int *cmp_value, const void *_info1, const void *_info2);
static herr_t H5VL_rados_info_free(void *_info);
static herr_t H5VL_rados_term(void);
@@ -206,7 +207,7 @@ static H5VL_class_t H5VL_rados_g = {
{ /* info_cls - may need more here (DER) */
sizeof(H5VL_rados_info_t), /* info size */
H5VL_rados_info_copy, /* info copy */
- NULL, /* info compare */
+ H5VL_rados_info_cmp, /* info compare */
H5VL_rados_info_free, /* info free */
NULL, /* info to str */
NULL /* str to info */
@@ -876,6 +877,38 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5VL_rados_info_cmp
+ *
+ * Purpose: Compare rados-specific file access properties.
+ *
+ * Return: Success: 0, cmp_value set to a value like strcmp
+ * Failure: -1
+ *
+ * Programmer: Dana Robinson
+ * April, 2019
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5VL_rados_info_cmp(int *cmp_value, const void *_info1, const void *_info2)
+{
+ H5VL_rados_info_t *info1 = (H5VL_rados_info_t *)_info1;
+ H5VL_rados_info_t *info2 = (H5VL_rados_info_t *)_info2;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ assert(info1);
+ assert(info2);
+
+ *cmp_value = memcmp(info1, info2, sizeof(H5VL_rados_info_t));
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL_rados_info_cmp() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5VL_rados_info_free
*
* Purpose: Frees the rados-specific file access properties.