summaryrefslogtreecommitdiffstats
path: root/src/H5FD.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FD.c')
-rw-r--r--src/H5FD.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/H5FD.c b/src/H5FD.c
index 5498644..d12bb57 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -231,9 +231,9 @@ H5FDregister(const H5FD_class_t *cls)
"'get_eoa' and/or 'set_eoa' methods are not defined")
if (!cls->get_eof)
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "'get_eof' method is not defined")
- if (!cls->read)
+ if (!cls->read || !cls->write)
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID,
- "'read' method is not defined")
+ "'read' and/or 'write' method is not defined")
for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++)
if (cls->fl_map[type] < H5FD_MEM_NOLIST || cls->fl_map[type] >= H5FD_MEM_NTYPES)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid free-list mapping")
@@ -277,7 +277,7 @@ H5FD_register(const void *_cls, size_t size, hbool_t app_ref)
HDassert(cls->open && cls->close);
HDassert(cls->get_eoa && cls->set_eoa);
HDassert(cls->get_eof);
- HDassert(cls->read);
+ HDassert(cls->read && cls->write);
for (type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; type++) {
HDassert(cls->fl_map[type] >= H5FD_MEM_NOLIST && cls->fl_map[type] < H5FD_MEM_NTYPES);
}
@@ -1417,10 +1417,6 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz
if (!buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "result buffer parameter can't be NULL")
- /* Make sure this isn't being called on a read-only VFD */
- if (!file->cls->write)
- HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "write request made to read-only VFD")
-
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == dxpl_id)
dxpl_id = H5P_DATASET_XFER_DEFAULT;