200-disable_compat.patch 19 KB

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