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