Home | History | Annotate | Download | only in librefuse

Lines Matching defs:fuse

89 static int fuse_setattr(struct fuse *, struct puffs_node *,
123 * we follow fuse's lead and use the pthread specific information to hold
164 * enable use of multiple fuse instances within a single process.
208 /* If we are the last fuse instances using the key, delete it */
217 /* set the uid and gid of the calling process in the current fuse context */
234 /* set the pid of the calling process in the current fuse context */
296 * Some FUSE file systems like to always use 0 as the
310 fuse_getattr(struct fuse *fuse, struct puffs_node *pn, const char *path,
320 ret = fuse_fs_getattr_v30(fuse->fs, path, &st, fi);
333 fuse_setattr(struct fuse *fuse, struct puffs_node *pn, const char *path,
350 ret = fuse_fs_chmod_v30(fuse->fs, path, mode, fi);
355 ret = fuse_fs_chown_v30(fuse->fs, path, uid, gid, fi);
369 ret = fuse_fs_utimens_v30(fuse->fs, path, tv, fi);
374 ret = fuse_fs_truncate_v30(fuse->fs, path, (off_t)va->va_size, fi);
393 struct fuse *fuse;
395 fuse = puffs_getspecific(pu);
401 fuse_fs_rmdir(fuse->fs, path);
403 fuse_fs_unlink(fuse->fs, path);
407 fuse_setattr(fuse, pn, path, va);
408 if (fuse_getattr(fuse, pn, path, &newva) == 0)
433 struct fuse *fuse;
437 fuse = puffs_getspecific(pu);
441 ret = fuse_fs_getattr_v30(fuse->fs, path, &st, NULL);
471 struct fuse *fuse;
474 fuse = puffs_getspecific(pu);
478 return fuse_getattr(fuse, pn, path, va);
488 struct fuse *fuse;
492 fuse = puffs_getspecific(pu);
497 ret = fuse_fs_readlink(fuse->fs, path, linkname, *linklen);
517 struct fuse *fuse;
522 fuse = puffs_getspecific(pu);
528 ret = fuse_fs_mknod(fuse->fs, path, mode, va->va_rdev);
544 struct fuse *fuse;
549 fuse = puffs_getspecific(pu);
554 ret = fuse_fs_mkdir(fuse->fs, path, mode);
566 * since linux/fuse sports using mknod for creating regular files
576 struct fuse *fuse;
583 fuse = puffs_getspecific(pu);
590 * fuse, on the other hand, "create" is actually a
593 * emulate the fuse semantics is to open the file with dummy
596 * You might think that we could simply use fuse->op.mknod all
602 ret = fuse_fs_create(fuse->fs, path, mode | S_IFREG, &fi);
607 ret = fuse_fs_mknod(fuse->fs, path, mode | S_IFREG, 0);
618 (void)fuse_fs_release(fuse->fs, path, &rn->file_info);
632 struct fuse *fuse;
636 fuse = puffs_getspecific(pu);
641 ret = fuse_fs_unlink(fuse->fs, path);
653 struct fuse *fuse;
657 fuse = puffs_getspecific(pu);
662 ret = fuse_fs_rmdir(fuse->fs, path);
674 struct fuse *fuse;
678 fuse = puffs_getspecific(pu);
683 ret = fuse_fs_symlink(fuse
699 struct fuse *fuse;
704 fuse = puffs_getspecific(pu);
708 ret = fuse_fs_rename_v30(fuse->fs, path_src, path_dest, 0);
720 struct fuse *fuse;
723 fuse = puffs_getspecific(pu);
728 ret = fuse_fs_link(fuse->fs, PNPATH(pn), PCNPATH(pcn));
734 * fuse's regular interface provides chmod(), chown(), utimes()
744 struct fuse *fuse;
747 fuse = puffs_getspecific(pu);
751 return fuse_setattr(fuse, pn, path, va);
775 struct fuse *fuse;
779 fuse = puffs_getspecific(pu);
793 ret = fuse_fs_opendir(fuse->fs, path, fi);
795 ret = fuse_fs_open(fuse->fs, path, fi);
813 struct fuse *fuse;
818 fuse = puffs_getspecific(pu);
826 ret = fuse_fs_releasedir(fuse->fs, path, fi);
828 ret = fuse_fs_release(fuse->fs, path, fi);
846 struct fuse *fuse;
851 fuse = puffs_getspecific(pu);
863 ret = fuse_fs_read(fuse->fs, path, (char *)buf, maxread, offset,
883 struct fuse *fuse;
887 fuse = puffs_getspecific(pu);
894 ret = fuse_fs_write(fuse->fs, path, (char *)buf, *resid, offset,
920 struct fuse *fuse;
925 fuse = puffs_getspecific(pu);
944 fuse->fs, path, dirh, puffs_fuse_fill_dir,
986 struct fuse *fuse;
988 fuse = puffs_getspecific(pu);
989 fuse_fs_destroy(fuse->fs);
1006 struct fuse *fuse;
1015 fuse = puffs_getspecific(pu);
1016 ret = fuse_fs_statfs(fuse->fs, PNPATH(puffs_getroot(pu)), &sb);
1026 struct fuse *
1032 struct fuse *fuse = NULL;
1061 fprintf(stderr, "fuse: no mountpoint specified\n");
1070 fuse = __fuse_new(&args, op, op_version, user_data);
1071 if (fuse == NULL)
1077 if (fuse_mount_v30(fuse, opts->mountpoint) != 0)
1080 if (__fuse_set_signal_handlers(fuse) != 0) {
1088 fuse_destroy_v30(fuse);
1089 fuse = NULL;
1094 return fuse;
1098 __fuse_teardown(struct fuse* fuse)
1100 if (__fuse_remove_signal_handlers(fuse) != 0)
1103 fuse_unmount_v30(fuse);
1112 struct fuse *fuse;
1115 fuse = __fuse_setup(argc, argv, op, op_version, user_data, &opts);
1116 if (fuse == NULL)
1119 rv = fuse_loop(fuse);
1121 __fuse_teardown(fuse);
1127 int __fuse_mount(struct fuse *fuse, const char *mountpoint)
1134 pn_root = newrn(fuse->pu);
1135 puffs_setroot(fuse->pu, pn_root);
1139 po_root = puffs_getrootpathobj(fuse->pu);
1143 puffs_path_buildhash(fuse->pu, po_root);
1155 puffs_set_prepost(fuse->pu, set_fuse_context_pid, NULL);
1158 if (puffs_mount(fuse->pu, mountpoint, MNT_NODEV | MNT_NOSUID, pn_root) == -1) {
1167 /* There is an impedance mismatch here: FUSE wants to
1170 struct fuse *fuse = fuse_get_context()->fuse;
1172 if (!fuse)
1173 /* FUSE would probably allow this, but we cannot. */
1179 return puffs_daemon(fuse->pu, 0, 0);
1184 struct fuse *
1191 struct fuse *fuse;
1199 if ((fuse = calloc(1, sizeof(*fuse))) == NULL) {
1206 free(fuse);
1211 fuse->fs = __fuse_fs_new(op, op_version, user_data);
1214 fusectx->fuse = fuse;
1257 pu = puffs_init(pops, _PATH_PUFFS, config.fsname, fuse, puffs_flags);
1261 fuse->pu = pu;
1264 return fuse;
1268 fuse_loop(struct fuse *fuse)
1273 /* struct fuse_conn_info is a part of the FUSE API so we must
1279 fuse_fs_init_v30(fuse->fs, &conn, &cfg);
1281 return puffs_mainloop(fuse->pu);
1285 __fuse_loop_mt(struct fuse *fuse,
1289 return fuse_loop(fuse);
1293 __fuse_destroy(struct fuse *fuse)
1304 free(fuse);
1308 fuse_exit(struct fuse *fuse)
1311 if (fuse->dead == 0)
1312 puffs_exit(fuse->pu, 1);
1313 fuse->dead = 1;
1321 __fuse_unmount(struct fuse *fuse)
1324 if (fuse->dead == 0)
1325 puffs_exit(fuse->pu, 1);
1326 fuse->dead = 1;
1344 fuse_invalidate_path(struct fuse *fuse __attribute__((__unused__)),
1369 * to struct puffs_cred in struct fuse upon entering a puffs
1376 fuse_start_cleanup_thread(struct fuse *fuse)
1383 fuse_stop_cleanup_thread(struct fuse *fuse) {
1388 fuse_clean_cache(struct fuse *fuse) {
1393 /* This is a legacy function that has been removed from the FUSE API,