• Home
  • Raw
  • Download

Lines Matching refs:mo

186 	struct mount_opts *mo = data;  in fuse_mount_opt_proc()  local
193 set_mount_flag(arg, &mo->flags); in fuse_mount_opt_proc()
197 return fuse_opt_add_opt(&mo->kernel_opts, arg); in fuse_mount_opt_proc()
200 return fuse_opt_add_opt_escaped(&mo->fusermount_opts, arg); in fuse_mount_opt_proc()
203 return fuse_opt_add_opt(&mo->subtype_opt, arg); in fuse_mount_opt_proc()
206 return fuse_opt_add_opt(&mo->mtab_opts, arg); in fuse_mount_opt_proc()
307 static int fuse_mount_fusermount(const char *mountpoint, struct mount_opts *mo, in fuse_mount_fusermount() argument
367 if (!mo->auto_unmount) { in fuse_mount_fusermount()
384 static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, in fuse_mount_sys() argument
407 if (mo->auto_unmount) { in fuse_mount_sys()
428 res = fuse_opt_add_opt(&mo->kernel_opts, tmp); in fuse_mount_sys()
432 source = malloc((mo->fsname ? strlen(mo->fsname) : 0) + in fuse_mount_sys()
433 (mo->subtype ? strlen(mo->subtype) : 0) + in fuse_mount_sys()
436 type = malloc((mo->subtype ? strlen(mo->subtype) : 0) + 32); in fuse_mount_sys()
442 strcpy(type, mo->blkdev ? "fuseblk" : "fuse"); in fuse_mount_sys()
443 if (mo->subtype) { in fuse_mount_sys()
445 strcat(type, mo->subtype); in fuse_mount_sys()
448 mo->fsname ? mo->fsname : (mo->subtype ? mo->subtype : devname)); in fuse_mount_sys()
450 res = mount(source, mnt, type, mo->flags, mo->kernel_opts); in fuse_mount_sys()
451 if (res == -1 && errno == ENODEV && mo->subtype) { in fuse_mount_sys()
453 strcpy(type, mo->blkdev ? "fuseblk" : "fuse"); in fuse_mount_sys()
454 if (mo->fsname) { in fuse_mount_sys()
455 if (!mo->blkdev) in fuse_mount_sys()
456 sprintf(source, "%s#%s", mo->subtype, in fuse_mount_sys()
457 mo->fsname); in fuse_mount_sys()
461 res = mount(source, mnt, type, mo->flags, mo->kernel_opts); in fuse_mount_sys()
472 if (mo->blkdev && errno == ENODEV && in fuse_mount_sys()
529 struct mount_opts *mo; in parse_mount_opts() local
531 mo = (struct mount_opts*) malloc(sizeof(struct mount_opts)); in parse_mount_opts()
532 if (mo == NULL) in parse_mount_opts()
535 memset(mo, 0, sizeof(struct mount_opts)); in parse_mount_opts()
536 mo->flags = MS_NOSUID | MS_NODEV; in parse_mount_opts()
539 fuse_opt_parse(args, mo, fuse_mount_opts, fuse_mount_opt_proc) == -1) in parse_mount_opts()
542 return mo; in parse_mount_opts()
545 destroy_mount_opts(mo); in parse_mount_opts()
549 void destroy_mount_opts(struct mount_opts *mo) in destroy_mount_opts() argument
551 free(mo->fsname); in destroy_mount_opts()
552 free(mo->subtype); in destroy_mount_opts()
553 free(mo->fusermount_opts); in destroy_mount_opts()
554 free(mo->subtype_opt); in destroy_mount_opts()
555 free(mo->kernel_opts); in destroy_mount_opts()
556 free(mo->mtab_opts); in destroy_mount_opts()
557 free(mo); in destroy_mount_opts()
561 int fuse_kern_mount(const char *mountpoint, struct mount_opts *mo) in fuse_kern_mount() argument
567 if (get_mnt_flag_opts(&mnt_opts, mo->flags) == -1) in fuse_kern_mount()
569 if (mo->kernel_opts && fuse_opt_add_opt(&mnt_opts, mo->kernel_opts) == -1) in fuse_kern_mount()
571 if (mo->mtab_opts && fuse_opt_add_opt(&mnt_opts, mo->mtab_opts) == -1) in fuse_kern_mount()
574 res = fuse_mount_sys(mountpoint, mo, mnt_opts); in fuse_kern_mount()
576 if (mo->fusermount_opts && in fuse_kern_mount()
577 fuse_opt_add_opt(&mnt_opts, mo->fusermount_opts) == -1) in fuse_kern_mount()
580 if (mo->subtype) { in fuse_kern_mount()
585 fuse_opt_add_opt(&tmp_opts, mo->subtype_opt) == -1) { in fuse_kern_mount()
590 res = fuse_mount_fusermount(mountpoint, mo, tmp_opts, 1); in fuse_kern_mount()
593 res = fuse_mount_fusermount(mountpoint, mo, in fuse_kern_mount()
596 res = fuse_mount_fusermount(mountpoint, mo, mnt_opts, 0); in fuse_kern_mount()