|
60 | 60 | #include <grp.h> |
61 | 61 |
|
62 | 62 | #include "ltfs_fuse.h" |
| 63 | +#include <fuse3/fuse_lowlevel.h> |
63 | 64 | #include "libltfs/ltfs.h" |
64 | 65 | #include "ltfs_copyright.h" |
65 | 66 | #include "libltfs/pathname.h" |
@@ -747,18 +748,18 @@ int main(int argc, char **argv) |
747 | 748 | } |
748 | 749 |
|
749 | 750 | /* Unlink objects from the file system instead of having them renamed to .fuse_hidden */ |
750 | | - ret = fuse_opt_add_arg(&args, "-ohard_remove"); |
| 751 | +/* FUSE3: removed deprecated option: ret = fuse_opt_add_arg(&args, "-ohard_remove"); */ |
751 | 752 | if (ret < 0) { |
752 | 753 | /* Could not enable FUSE option */ |
753 | | - ltfsmsg(LTFS_ERR, 14001E, "hard_remove", ret); |
| 754 | +/* FUSE3: removed deprecated option: ltfsmsg(LTFS_ERR, 14001E, "hard_remove", ret); */ |
754 | 755 | return 1; |
755 | 756 | } |
756 | 757 |
|
757 | 758 | /* perform reads synchronously */ |
758 | | - ret = fuse_opt_add_arg(&args, "-osync_read"); |
| 759 | +/* FUSE3: removed deprecated option: ret = fuse_opt_add_arg(&args, "-osync_read"); */ |
759 | 760 | if (ret < 0) { |
760 | 761 | /* Could not enable FUSE option */ |
761 | | - ltfsmsg(LTFS_ERR, 14001E, "sync_read", ret); |
| 762 | +/* FUSE3: removed deprecated option: ltfsmsg(LTFS_ERR, 14001E, "sync_read", ret); */ |
762 | 763 | return 1; |
763 | 764 | } |
764 | 765 |
|
@@ -788,11 +789,11 @@ int main(int argc, char **argv) |
788 | 789 | #endif |
789 | 790 |
|
790 | 791 | #if FUSE_VERSION >= 28 |
791 | | - /* For FUSE 2.8 or higher, automatically enable big_writes */ |
792 | | - ret = fuse_opt_add_arg(&args, "-obig_writes"); |
| 792 | +/* FUSE3: removed deprecated option: For FUSE 2.8 or higher, automatically enable big_writes */ |
| 793 | +/* FUSE3: removed deprecated option: ret = fuse_opt_add_arg(&args, "-obig_writes"); */ |
793 | 794 | if (ret < 0) { |
794 | 795 | /* Could not enable FUSE option */ |
795 | | - ltfsmsg(LTFS_ERR, 14001E, "big_writes", ret); |
| 796 | +/* FUSE3: removed deprecated option: ltfsmsg(LTFS_ERR, 14001E, "big_writes", ret); */ |
796 | 797 | return 1; |
797 | 798 | } |
798 | 799 | #endif |
@@ -974,10 +975,10 @@ int single_drive_main(struct fuse_args *args, struct ltfs_fuse_data *priv) |
974 | 975 | /* If the local inode space is big enough, have FUSE pass through our UIDs as inode |
975 | 976 | * numbers instead of generating its own. */ |
976 | 977 | if (sizeof(ino_t) >= 8) { |
977 | | - ret = fuse_opt_add_arg(args, "-ouse_ino"); |
| 978 | +/* FUSE3: removed deprecated option: ret = fuse_opt_add_arg(args, "-ouse_ino"); */ |
978 | 979 | if (ret < 0) { |
979 | 980 | /* Could not enable FUSE option */ |
980 | | - ltfsmsg(LTFS_ERR, 14001E, "use_ino", ret); |
| 981 | +/* FUSE3: removed deprecated option: ltfsmsg(LTFS_ERR, 14001E, "use_ino", ret); */ |
981 | 982 | return 1; |
982 | 983 | } |
983 | 984 | } |
@@ -1223,12 +1224,16 @@ int single_drive_main(struct fuse_args *args, struct ltfs_fuse_data *priv) |
1223 | 1224 | for ( i=0; i<args->argc; i++) { |
1224 | 1225 | fuse_opt_add_arg(&tmpa, args->argv[i]); |
1225 | 1226 | } |
1226 | | - ret = fuse_parse_cmdline( &tmpa, &mountpoint, NULL, NULL); |
1227 | | - fuse_opt_free_args(&tmpa); |
1228 | | - if (ret < 0 || mountpoint == NULL) { |
1229 | | - ltfsmsg(LTFS_ERR, 14094E, ret); |
1230 | | - ltfs_volume_free(&priv->data); |
1231 | | - return 1; |
| 1227 | + { |
| 1228 | + struct fuse_cmdline_opts fuse_opts; |
| 1229 | + ret = fuse_parse_cmdline(&tmpa, &fuse_opts); |
| 1230 | + fuse_opt_free_args(&tmpa); |
| 1231 | + if (ret < 0 || fuse_opts.mountpoint == NULL) { |
| 1232 | + ltfsmsg(LTFS_ERR, 14094E, ret); |
| 1233 | + ltfs_volume_free(&priv->data); |
| 1234 | + return 1; |
| 1235 | + } |
| 1236 | + mountpoint = fuse_opts.mountpoint; |
1232 | 1237 | } |
1233 | 1238 | priv->data->mountpoint = mountpoint; |
1234 | 1239 | priv->data->mountpoint_len = strlen(mountpoint); |
|
0 commit comments