aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_fs/fs-loader.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-05-31 20:58:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-05-31 20:58:28 +0000
commitbbee6e0814d5875b85b81f26fd4ca7a28b6f9570 (patch)
tree726fcf32b39ca8976d7aa51b67c7236509f1bde4 /subversion/libsvn_fs/fs-loader.c
parent38cef28c88864beaadac7a7cffdec6da952c3eb2 (diff)
downloadsrc-vendor/subversion.tar.gz
src-vendor/subversion.zip
Notes
Notes: svn path=/vendor/subversion/dist/; revision=361669 svn path=/vendor/subversion/subversion-1.14.0/; revision=361670; tag=vendor/subversion/subversion-1.14.0
Diffstat (limited to 'subversion/libsvn_fs/fs-loader.c')
-rw-r--r--subversion/libsvn_fs/fs-loader.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/subversion/libsvn_fs/fs-loader.c b/subversion/libsvn_fs/fs-loader.c
index f898d8a56a6a..3840f225419c 100644
--- a/subversion/libsvn_fs/fs-loader.c
+++ b/subversion/libsvn_fs/fs-loader.c
@@ -2221,3 +2221,42 @@ svn_fs_info_dup(const void *info_void,
return apr_pmemdup(result_pool, info, sizeof(*info));
}
+svn_error_t *
+svn_fs_ioctl(svn_fs_t *fs,
+ svn_fs_ioctl_code_t ctlcode,
+ void *input,
+ void **output_p,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ void *output;
+
+ if (fs)
+ {
+ if (!fs->vtable->ioctl)
+ return svn_error_create(SVN_ERR_FS_UNRECOGNIZED_IOCTL_CODE, NULL, NULL);
+
+ SVN_ERR(fs->vtable->ioctl(fs, ctlcode, input, &output,
+ cancel_func, cancel_baton,
+ result_pool, scratch_pool));
+ }
+ else
+ {
+ fs_library_vtable_t *vtable;
+
+ SVN_ERR(get_library_vtable(&vtable, ctlcode.fs_type, scratch_pool));
+
+ if (!vtable->ioctl)
+ return svn_error_create(SVN_ERR_FS_UNRECOGNIZED_IOCTL_CODE, NULL, NULL);
+
+ SVN_ERR(vtable->ioctl(ctlcode, input, &output,
+ cancel_func, cancel_baton,
+ result_pool, scratch_pool));
+ }
+
+ if (output_p)
+ *output_p = output;
+ return SVN_NO_ERROR;
+}