summaryrefslogtreecommitdiffstats
path: root/src/H5FDint.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-01-13 04:12:51 (GMT)
committerGitHub <noreply@github.com>2021-01-13 04:12:51 (GMT)
commitb84f48f929ec02b9a2fefa036c63656af2f4aa89 (patch)
tree7a6eb6609b553f9262b69970d96a775c69d2f50a /src/H5FDint.c
parent0e09b0b636b25bfe6226cc5ef5fa52e75383c32c (diff)
downloadhdf5-b84f48f929ec02b9a2fefa036c63656af2f4aa89.zip
hdf5-b84f48f929ec02b9a2fefa036c63656af2f4aa89.tar.gz
hdf5-b84f48f929ec02b9a2fefa036c63656af2f4aa89.tar.bz2
Allow read-only VFD registration (#257)
* Removes no-op callback stubs from read-only VFDs Also changes VFD registration to allow read-only VFDs with no write callback to be registered. * Adds a RELEASE.txt note for HDFFV-11205 For the read-only VFD registration change
Diffstat (limited to 'src/H5FDint.c')
-rw-r--r--src/H5FDint.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5FDint.c b/src/H5FDint.c
index b651c23..8c93f1c 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -215,6 +215,10 @@ H5FD_write(H5FD_t *file, H5FD_mem_t type, haddr_t addr, size_t size, const void
HDassert(file->cls);
HDassert(buf);
+ /* 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 proper DXPL for I/O */
dxpl_id = H5CX_get_dxpl();