aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_fs/fs-loader.c
diff options
context:
space:
mode:
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;
+}