1*5d27a072Srillig /* $NetBSD: v30.c,v 1.2 2022/01/23 21:07:28 rillig Exp $ */
2ec9afb42Spho
3ec9afb42Spho /*
4ec9afb42Spho * Copyright (c) 2021 The NetBSD Foundation, Inc.
5ec9afb42Spho * All rights reserved.
6ec9afb42Spho *
7ec9afb42Spho * Redistribution and use in source and binary forms, with or without
8ec9afb42Spho * modification, are permitted provided that the following conditions
9ec9afb42Spho * are met:
10ec9afb42Spho * 1. Redistributions of source code must retain the above copyright
11ec9afb42Spho * notice, this list of conditions and the following disclaimer.
12ec9afb42Spho * 2. Redistributions in binary form must reproduce the above copyright
13ec9afb42Spho * notice, this list of conditions and the following disclaimer in the
14ec9afb42Spho * documentation and/or other materials provided with the distribution.
15ec9afb42Spho * 3. The name of the author may not be used to endorse or promote
16ec9afb42Spho * products derived from this software without specific prior written
17ec9afb42Spho * permission.
18ec9afb42Spho *
19ec9afb42Spho * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
20ec9afb42Spho * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21ec9afb42Spho * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22ec9afb42Spho * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23ec9afb42Spho * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24ec9afb42Spho * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25ec9afb42Spho * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26ec9afb42Spho * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27ec9afb42Spho * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28ec9afb42Spho * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29ec9afb42Spho * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30ec9afb42Spho */
31ec9afb42Spho
32ec9afb42Spho #include <sys/cdefs.h>
33ec9afb42Spho #if !defined(lint)
34*5d27a072Srillig __RCSID("$NetBSD: v30.c,v 1.2 2022/01/23 21:07:28 rillig Exp $");
35ec9afb42Spho #endif /* !lint */
36ec9afb42Spho
37ec9afb42Spho #include <fuse_internal.h>
38ec9afb42Spho
39ec9afb42Spho int
fuse_mount_v30(struct fuse * fuse,const char * mountpoint)40ec9afb42Spho fuse_mount_v30(struct fuse *fuse, const char *mountpoint) {
41ec9afb42Spho return __fuse_mount(fuse, mountpoint);
42ec9afb42Spho }
43ec9afb42Spho
44ec9afb42Spho void
fuse_unmount_v30(struct fuse * fuse)45ec9afb42Spho fuse_unmount_v30(struct fuse *fuse) {
46ec9afb42Spho __fuse_unmount(fuse);
47ec9afb42Spho }
48ec9afb42Spho
49ec9afb42Spho struct fuse *
fuse_new_v30(struct fuse_args * args,const void * op,int op_version,void * user_data)50ec9afb42Spho fuse_new_v30(struct fuse_args *args,
51ec9afb42Spho const void *op, int op_version, void *user_data) {
52ec9afb42Spho return __fuse_new(args, op, op_version, user_data);
53ec9afb42Spho }
54ec9afb42Spho
55ec9afb42Spho void
fuse_destroy_v30(struct fuse * fuse)56ec9afb42Spho fuse_destroy_v30(struct fuse *fuse) {
57*5d27a072Srillig __fuse_destroy(fuse);
58ec9afb42Spho }
59ec9afb42Spho
60ec9afb42Spho int
fuse_loop_mt_v30(struct fuse * fuse,int clone_fd)61ec9afb42Spho fuse_loop_mt_v30(struct fuse *fuse, int clone_fd) {
62ec9afb42Spho struct fuse_loop_config config = {
63ec9afb42Spho .clone_fd = clone_fd,
64ec9afb42Spho .max_idle_threads = 10 /* The default value when "config" is NULL. */
65ec9afb42Spho };
66ec9afb42Spho return __fuse_loop_mt(fuse, &config);
67ec9afb42Spho }
68ec9afb42Spho
69ec9afb42Spho int
fuse_parse_cmdline_v30(struct fuse_args * args,struct fuse_cmdline_opts * opts)70ec9afb42Spho fuse_parse_cmdline_v30(struct fuse_args *args, struct fuse_cmdline_opts *opts) {
71ec9afb42Spho return __fuse_parse_cmdline(args, opts);
72ec9afb42Spho }
73