summaryrefslogtreecommitdiff
path: root/package/fuse/patches/200-disable_compat.patch
blob: d4bb97860583e07045ba4164fe27111960acec7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
Index: fuse-2.7.1/include/fuse_common_compat.h
===================================================================
--- fuse-2.7.1.orig/include/fuse_common_compat.h	2007-10-20 17:13:51.409738304 +0200
+++ fuse-2.7.1/include/fuse_common_compat.h	2007-10-20 17:14:26.323727941 +0200
@@ -17,6 +17,7 @@
     unsigned int keep_cache : 1;
 };
 
+#ifndef DISABLE_COMPAT
 int fuse_mount_compat25(const char *mountpoint, struct fuse_args *args);
 
 int fuse_mount_compat22(const char *mountpoint, const char *opts);
@@ -24,4 +25,4 @@
 int fuse_mount_compat1(const char *mountpoint, const char *args[]);
 
 void fuse_unmount_compat22(const char *mountpoint);
-
+#endif
Index: fuse-2.7.1/lib/fuse.c
===================================================================
--- fuse-2.7.1.orig/lib/fuse.c	2007-10-20 17:13:51.417738760 +0200
+++ fuse-2.7.1/lib/fuse.c	2007-10-20 17:26:30.657005340 +0200
@@ -14,8 +14,6 @@
 #include "fuse_lowlevel.h"
 #include "fuse_opt.h"
 #include "fuse_misc.h"
-#include "fuse_common_compat.h"
-#include "fuse_compat.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -621,127 +619,6 @@
         fuse_do_prepare_interrupt(req, d);
 }
 
-#ifndef __FreeBSD__
-
-static int fuse_compat_open(struct fuse_fs *fs, const char *path,
-                            struct fuse_file_info *fi)
-{
-    int err;
-    if (!fs->compat || fs->compat >= 25)
-        err = fs->op.open(path, fi);
-    else if (fs->compat == 22) {
-        struct fuse_file_info_compat tmp;
-        memcpy(&tmp, fi, sizeof(tmp));
-        err = ((struct fuse_operations_compat22 *) &fs->op)->open(path, &tmp);
-        memcpy(fi, &tmp, sizeof(tmp));
-        fi->fh = tmp.fh;
-    } else
-        err = ((struct fuse_operations_compat2 *) &fs->op)
-            ->open(path, fi->flags);
-    return err;
-}
-
-static int fuse_compat_release(struct fuse_fs *fs, const char *path,
-                               struct fuse_file_info *fi)
-{
-    if (!fs->compat || fs->compat >= 22)
-        return fs->op.release(path, fi);
-    else
-        return ((struct fuse_operations_compat2 *) &fs->op)
-            ->release(path, fi->flags);
-}
-
-static int fuse_compat_opendir(struct fuse_fs *fs, const char *path,
-                               struct fuse_file_info *fi)
-{
-    if (!fs->compat || fs->compat >= 25)
-        return fs->op.opendir(path, fi);
-    else {
-        int err;
-        struct fuse_file_info_compat tmp;
-        memcpy(&tmp, fi, sizeof(tmp));
-        err = ((struct fuse_operations_compat22 *) &fs->op)
-            ->opendir(path, &tmp);
-        memcpy(fi, &tmp, sizeof(tmp));
-        fi->fh = tmp.fh;
-        return err;
-    }
-}
-
-static void convert_statfs_compat(struct fuse_statfs_compat1 *compatbuf,
-                                  struct statvfs *stbuf)
-{
-    stbuf->f_bsize   = compatbuf->block_size;
-    stbuf->f_blocks  = compatbuf->blocks;
-    stbuf->f_bfree   = compatbuf->blocks_free;
-    stbuf->f_bavail  = compatbuf->blocks_free;
-    stbuf->f_files   = compatbuf->files;
-    stbuf->f_ffree   = compatbuf->files_free;
-    stbuf->f_namemax = compatbuf->namelen;
-}
-
-static void convert_statfs_old(struct statfs *oldbuf, struct statvfs *stbuf)
-{
-    stbuf->f_bsize   = oldbuf->f_bsize;
-    stbuf->f_blocks  = oldbuf->f_blocks;
-    stbuf->f_bfree   = oldbuf->f_bfree;
-    stbuf->f_bavail  = oldbuf->f_bavail;
-    stbuf->f_files   = oldbuf->f_files;
-    stbuf->f_ffree   = oldbuf->f_ffree;
-    stbuf->f_namemax = oldbuf->f_namelen;
-}
-
-static int fuse_compat_statfs(struct fuse_fs *fs, const char *path,
-                              struct statvfs *buf)
-{
-    int err;
-
-    if (!fs->compat || fs->compat >= 25) {
-        err = fs->op.statfs(fs->compat == 25 ? "/" : path, buf);
-    } else if (fs->compat > 11) {
-        struct statfs oldbuf;
-        err = ((struct fuse_operations_compat22 *) &fs->op)
-            ->statfs("/", &oldbuf);
-        if (!err)
-            convert_statfs_old(&oldbuf, buf);
-    } else {
-        struct fuse_statfs_compat1 compatbuf;
-        memset(&compatbuf, 0, sizeof(struct fuse_statfs_compat1));
-        err = ((struct fuse_operations_compat1 *) &fs->op)->statfs(&compatbuf);
-        if (!err)
-            convert_statfs_compat(&compatbuf, buf);
-    }
-    return err;
-}
-
-#else /* __FreeBSD__ */
-
-static inline int fuse_compat_open(struct fuse_fs *fs, char *path,
-                                   struct fuse_file_info *fi)
-{
-    return fs->op.open(path, fi);
-}
-
-static inline int fuse_compat_release(struct fuse_fs *fs, const char *path,
-                                      struct fuse_file_info *fi)
-{
-    return fs->op.release(path, fi);
-}
-
-static inline int fuse_compat_opendir(struct fuse_fs *fs, const char *path,
-                                      struct fuse_file_info *fi)
-{
-    return fs->op.opendir(path, fi);
-}
-
-static inline int fuse_compat_statfs(struct fuse_fs *fs, const char *path,
-                                     struct statvfs *buf)
-{
-    return fs->op.statfs(fs->compat == 25 ? "/" : path, buf);
-}
-
-#endif /* __FreeBSD__ */
-
 int fuse_fs_getattr(struct fuse_fs *fs, const char *path, struct stat *buf)
 {
     fuse_get_context()->private_data = fs->user_data;
@@ -814,7 +691,7 @@
 {
     fuse_get_context()->private_data = fs->user_data;
     if (fs->op.release)
-        return fuse_compat_release(fs, path, fi);
+        return fs->op.release(path, fi);
     else
         return 0;
 }
@@ -824,7 +701,7 @@
 {
     fuse_get_context()->private_data = fs->user_data;
     if (fs->op.opendir)
-        return fuse_compat_opendir(fs, path, fi);
+        return fs->op.opendir(path, fi);
     else
         return 0;
 }
@@ -834,7 +711,7 @@
 {
     fuse_get_context()->private_data = fs->user_data;
     if (fs->op.open)
-        return fuse_compat_open(fs, path, fi);
+        return fs->op.open(path, fi);
     else
         return 0;
 }
@@ -893,7 +770,7 @@
 {
     fuse_get_context()->private_data = fs->user_data;
     if (fs->op.statfs)
-        return fuse_compat_statfs(fs, path, buf);
+        return fs->op.statfs(path, buf);
     else {
         buf->f_namemax = 255;
         buf->f_bsize = 512;
@@ -3037,7 +2914,6 @@
     if (!fs)
         goto out_free;
 
-    fs->compat = compat;
     f->fs = fs;
 
     /* Oh f**k, this is ugly! */
@@ -3079,11 +2955,6 @@
     f->conf.readdir_ino = 1;
 #endif
 
-    if (compat && compat <= 25) {
-        if (fuse_sync_compat_args(args) == -1)
-            goto out_free_fs;
-    }
-
     f->se = fuse_lowlevel_new_common(args, &llop, sizeof(llop), f);
     if (f->se == NULL) {
         if (f->conf.help)
@@ -3217,19 +3088,6 @@
     fuse_delete_context_key();
 }
 
-static struct fuse *fuse_new_common_compat25(int fd, struct fuse_args *args,
-                                             const struct fuse_operations *op,
-                                             size_t op_size, int compat)
-{
-    struct fuse *f = NULL;
-    struct fuse_chan *ch = fuse_kern_chan_new(fd);
-
-    if (ch)
-        f = fuse_new_common(ch, args, op, op_size, NULL, compat);
-
-    return f;
-}
-
 /* called with fuse_context_lock held or during initialization (before
    main() has been called) */
 void fuse_register_module(struct fuse_module *mod)
@@ -3242,69 +3100,3 @@
     fuse_modules = mod;
 }
 
-#ifndef __FreeBSD__
-
-static struct fuse *fuse_new_common_compat(int fd, const char *opts,
-                                           const struct fuse_operations *op,
-                                           size_t op_size, int compat)
-{
-    struct fuse *f;
-    struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
-
-    if (fuse_opt_add_arg(&args, "") == -1)
-	return NULL;
-    if (opts &&
-        (fuse_opt_add_arg(&args, "-o") == -1 ||
-         fuse_opt_add_arg(&args, opts) == -1)) {
-        fuse_opt_free_args(&args);
-        return NULL;
-    }
-    f = fuse_new_common_compat25(fd, &args, op, op_size, compat);
-    fuse_opt_free_args(&args);
-
-    return f;
-}
-
-struct fuse *fuse_new_compat22(int fd, const char *opts,
-                               const struct fuse_operations_compat22 *op,
-                               size_t op_size)
-{
-    return fuse_new_common_compat(fd, opts, (struct fuse_operations *) op,
-                                  op_size, 22);
-}
-
-struct fuse *fuse_new_compat2(int fd, const char *opts,
-                              const struct fuse_operations_compat2 *op)
-{
-    return fuse_new_common_compat(fd, opts, (struct fuse_operations *) op,
-                                  sizeof(struct fuse_operations_compat2), 21);
-}
-
-struct fuse *fuse_new_compat1(int fd, int flags,
-                              const struct fuse_operations_compat1 *op)
-{
-    const char *opts = NULL;
-    if (flags & FUSE_DEBUG_COMPAT1)
-        opts = "debug";
-    return fuse_new_common_compat(fd, opts, (struct fuse_operations *) op,
-                                  sizeof(struct fuse_operations_compat1), 11);
-}
-
-__asm__(".symver fuse_exited,__fuse_exited@");
-__asm__(".symver fuse_process_cmd,__fuse_process_cmd@");
-__asm__(".symver fuse_read_cmd,__fuse_read_cmd@");
-__asm__(".symver fuse_set_getcontext_func,__fuse_set_getcontext_func@");
-__asm__(".symver fuse_new_compat2,fuse_new@");
-__asm__(".symver fuse_new_compat22,fuse_new@FUSE_2.2");
-
-#endif /* __FreeBSD__ */
-
-struct fuse *fuse_new_compat25(int fd, struct fuse_args *args,
-                               const struct fuse_operations_compat25 *op,
-                               size_t op_size)
-{
-    return fuse_new_common_compat25(fd, args, (struct fuse_operations *) op,
-                                    op_size, 25);
-}
-
-__asm__(".symver fuse_new_compat25,fuse_new@FUSE_2.5");
Index: fuse-2.7.1/lib/fuse_lowlevel.c
===================================================================
--- fuse-2.7.1.orig/lib/fuse_lowlevel.c	2007-10-20 17:13:51.425739218 +0200
+++ fuse-2.7.1/lib/fuse_lowlevel.c	2007-10-20 17:22:46.396225455 +0200
@@ -11,8 +11,6 @@
 #include "fuse_opt.h"
 #include "fuse_i.h"
 #include "fuse_misc.h"
-#include "fuse_common_compat.h"
-#include "fuse_lowlevel_compat.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -1310,129 +1308,3 @@
     return fuse_lowlevel_new_common(args, op, op_size, userdata);
 }
 
-
-#ifndef __FreeBSD__
-
-static void fill_open_compat(struct fuse_open_out *arg,
-                      const struct fuse_file_info_compat *f)
-{
-    arg->fh = f->fh;
-    if (f->direct_io)
-        arg->open_flags |= FOPEN_DIRECT_IO;
-    if (f->keep_cache)
-        arg->open_flags |= FOPEN_KEEP_CACHE;
-}
-
-static void convert_statfs_compat(const struct statfs *compatbuf,
-                                  struct statvfs *buf)
-{
-    buf->f_bsize	= compatbuf->f_bsize;
-    buf->f_blocks	= compatbuf->f_blocks;
-    buf->f_bfree	= compatbuf->f_bfree;
-    buf->f_bavail	= compatbuf->f_bavail;
-    buf->f_files	= compatbuf->f_files;
-    buf->f_ffree	= compatbuf->f_ffree;
-    buf->f_namemax	= compatbuf->f_namelen;
-}
-
-int fuse_reply_open_compat(fuse_req_t req,
-                           const struct fuse_file_info_compat *f)
-{
-    struct fuse_open_out arg;
-
-    memset(&arg, 0, sizeof(arg));
-    fill_open_compat(&arg, f);
-    return send_reply_ok(req, &arg, sizeof(arg));
-}
-
-int fuse_reply_statfs_compat(fuse_req_t req, const struct statfs *stbuf)
-{
-    struct statvfs newbuf;
-
-    memset(&newbuf, 0, sizeof(newbuf));
-    convert_statfs_compat(stbuf, &newbuf);
-
-    return fuse_reply_statfs(req, &newbuf);
-}
-
-struct fuse_session *fuse_lowlevel_new_compat(const char *opts,
-                            const struct fuse_lowlevel_ops_compat *op,
-                            size_t op_size, void *userdata)
-{
-    struct fuse_session *se;
-    struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
-
-    if (opts &&
-        (fuse_opt_add_arg(&args, "") == -1 ||
-         fuse_opt_add_arg(&args, "-o") == -1 ||
-         fuse_opt_add_arg(&args, opts) == -1)) {
-        fuse_opt_free_args(&args);
-        return NULL;
-    }
-    se = fuse_lowlevel_new(&args, (const struct fuse_lowlevel_ops *) op,
-                           op_size, userdata);
-    fuse_opt_free_args(&args);
-
-    return se;
-}
-
-struct fuse_ll_compat_conf {
-    unsigned max_read;
-    int set_max_read;
-};
-
-static const struct fuse_opt fuse_ll_opts_compat[] = {
-    { "max_read=", offsetof(struct fuse_ll_compat_conf, set_max_read), 1 },
-    { "max_read=%u", offsetof(struct fuse_ll_compat_conf, max_read), 0 },
-    FUSE_OPT_KEY("max_read=", FUSE_OPT_KEY_KEEP),
-    FUSE_OPT_END
-};
-
-int fuse_sync_compat_args(struct fuse_args *args)
-{
-    struct fuse_ll_compat_conf conf;
-
-    memset(&conf, 0, sizeof(conf));
-    if (fuse_opt_parse(args, &conf, fuse_ll_opts_compat, NULL) == -1)
-        return -1;
-
-    if (fuse_opt_insert_arg(args, 1, "-osync_read"))
-        return -1;
-
-    if (conf.set_max_read) {
-        char tmpbuf[64];
-
-        sprintf(tmpbuf, "-omax_readahead=%u", conf.max_read);
-        if (fuse_opt_insert_arg(args, 1, tmpbuf) == -1)
-            return -1;
-    }
-    return 0;
-}
-
-__asm__(".symver fuse_reply_statfs_compat,fuse_reply_statfs@FUSE_2.4");
-__asm__(".symver fuse_reply_open_compat,fuse_reply_open@FUSE_2.4");
-__asm__(".symver fuse_lowlevel_new_compat,fuse_lowlevel_new@FUSE_2.4");
-
-#else /* __FreeBSD__ */
-
-int fuse_sync_compat_args(struct fuse_args *args)
-{
-    (void) args;
-    return 0;
-}
-
-#endif /* __FreeBSD__ */
-
-struct fuse_session *fuse_lowlevel_new_compat25(struct fuse_args *args,
-                        const struct fuse_lowlevel_ops_compat25 *op,
-                        size_t op_size, void *userdata)
-{
-    if (fuse_sync_compat_args(args) == -1)
-        return NULL;
-
-    return fuse_lowlevel_new_common(args,
-                                    (const struct fuse_lowlevel_ops *) op,
-                                    op_size, userdata);
-}
-
-__asm__(".symver fuse_lowlevel_new_compat25,fuse_lowlevel_new@FUSE_2.5");
Index: fuse-2.7.1/lib/helper.c
===================================================================
--- fuse-2.7.1.orig/lib/helper.c	2007-10-20 17:13:51.433739673 +0200
+++ fuse-2.7.1/lib/helper.c	2007-10-20 17:21:32.508014797 +0200
@@ -10,7 +10,6 @@
 #include "fuse_i.h"
 #include "fuse_opt.h"
 #include "fuse_lowlevel.h"
-#include "fuse_common_compat.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -202,7 +201,7 @@
             close(fd);
     } while (fd >= 0 && fd <= 2);
 
-    fd = fuse_mount_compat25(mountpoint, args);
+    fd = fuse_kern_mount(mountpoint, args);
     if (fd == -1)
         return NULL;
 
@@ -349,97 +348,3 @@
 {
     return FUSE_VERSION;
 }
-
-#include "fuse_compat.h"
-
-#ifndef __FreeBSD__
-
-struct fuse *fuse_setup_compat22(int argc, char *argv[],
-                                 const struct fuse_operations_compat22 *op,
-                                 size_t op_size, char **mountpoint,
-                                 int *multithreaded, int *fd)
-{
-    return fuse_setup_common(argc, argv, (struct fuse_operations *) op,
-                             op_size, mountpoint, multithreaded, fd, NULL, 22);
-}
-
-struct fuse *fuse_setup_compat2(int argc, char *argv[],
-                                 const struct fuse_operations_compat2 *op,
-                                 char **mountpoint, int *multithreaded,
-                                 int *fd)
-{
-    return fuse_setup_common(argc, argv, (struct fuse_operations *) op,
-                             sizeof(struct fuse_operations_compat2),
-                             mountpoint, multithreaded, fd, NULL, 21);
-}
-
-int fuse_main_real_compat22(int argc, char *argv[],
-                            const struct fuse_operations_compat22 *op,
-                            size_t op_size)
-{
-    return fuse_main_common(argc, argv, (struct fuse_operations *) op, op_size,
-                            NULL, 22);
-}
-
-void fuse_main_compat1(int argc, char *argv[],
-                      const struct fuse_operations_compat1 *op)
-{
-    fuse_main_common(argc, argv, (struct fuse_operations *) op,
-                     sizeof(struct fuse_operations_compat1), NULL, 11);
-}
-
-int fuse_main_compat2(int argc, char *argv[],
-                      const struct fuse_operations_compat2 *op)
-{
-    return fuse_main_common(argc, argv, (struct fuse_operations *) op,
-                            sizeof(struct fuse_operations_compat2), NULL, 21);
-}
-
-int fuse_mount_compat1(const char *mountpoint, const char *args[])
-{
-    /* just ignore mount args for now */
-    (void) args;
-    return fuse_mount_compat22(mountpoint, NULL);
-}
-
-__asm__(".symver fuse_setup_compat2,__fuse_setup@");
-__asm__(".symver fuse_setup_compat22,fuse_setup@FUSE_2.2");
-__asm__(".symver fuse_teardown,__fuse_teardown@");
-__asm__(".symver fuse_main_compat2,fuse_main@");
-__asm__(".symver fuse_main_real_compat22,fuse_main_real@FUSE_2.2");
-
-#endif /* __FreeBSD__ */
-
-
-struct fuse *fuse_setup_compat25(int argc, char *argv[],
-                                 const struct fuse_operations_compat25 *op,
-                                 size_t op_size, char **mountpoint,
-                                 int *multithreaded, int *fd)
-{
-    return fuse_setup_common(argc, argv, (struct fuse_operations *) op,
-                             op_size, mountpoint, multithreaded, fd, NULL, 25);
-}
-
-int fuse_main_real_compat25(int argc, char *argv[],
-                            const struct fuse_operations_compat25 *op,
-                            size_t op_size)
-{
-    return fuse_main_common(argc, argv, (struct fuse_operations *) op, op_size,
-                            NULL, 25);
-}
-
-void fuse_teardown_compat22(struct fuse *fuse, int fd, char *mountpoint)
-{
-    (void) fd;
-    fuse_teardown_common(fuse, mountpoint);
-}
-
-int fuse_mount_compat25(const char *mountpoint, struct fuse_args *args)
-{
-    return fuse_kern_mount(mountpoint, args);
-}
-
-__asm__(".symver fuse_setup_compat25,fuse_setup@FUSE_2.5");
-__asm__(".symver fuse_teardown_compat22,fuse_teardown@FUSE_2.2");
-__asm__(".symver fuse_main_real_compat25,fuse_main_real@FUSE_2.5");
-__asm__(".symver fuse_mount_compat25,fuse_mount@FUSE_2.5");
Index: fuse-2.7.1/lib/mount.c
===================================================================
--- fuse-2.7.1.orig/lib/mount.c	2007-10-20 17:13:51.441740129 +0200
+++ fuse-2.7.1/lib/mount.c	2007-10-20 17:22:07.209992349 +0200
@@ -9,7 +9,6 @@
 #include "config.h"
 #include "fuse_i.h"
 #include "fuse_opt.h"
-#include "fuse_common_compat.h"
 #include "mount_util.h"
 
 #include <stdio.h>
@@ -308,11 +307,6 @@
     waitpid(pid, NULL, 0);
 }
 
-void fuse_unmount_compat22(const char *mountpoint)
-{
-    fuse_kern_unmount(mountpoint, -1);
-}
-
 static int fuse_mount_fusermount(const char *mountpoint, const char *opts,
                                  int quiet)
 {
@@ -376,11 +370,6 @@
     return rv;
 }
 
-int fuse_mount_compat22(const char *mountpoint, const char *opts)
-{
-    return fuse_mount_fusermount(mountpoint, opts, 0);
-}
-
 static int fuse_mount_sys(const char *mnt, struct mount_opts *mo,
                           const char *mnt_opts)
 {
@@ -579,5 +568,3 @@
     return res;
 }
 
-__asm__(".symver fuse_mount_compat22,fuse_mount@FUSE_2.2");
-__asm__(".symver fuse_unmount_compat22,fuse_unmount@FUSE_2.2");