1 /* guestmount - mount guests using libguestfs and FUSE
2 * Copyright (C) 2009-2010 Red Hat Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 * Derived from the example program 'fusexmp.c':
19 * Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
21 * This program can be distributed under the terms of the GNU GPL.
22 * See the file COPYING.
25 #define FUSE_USE_VERSION 26
43 #include <sys/types.h>
51 #include "guestmount.h"
55 /* See <attr/xattr.h> */
57 #define ENOATTR ENODATA
65 int keys_from_stdin = 0;
67 const char *libvirt_uri;
68 int dir_cache_timeout = 60;
69 static int trace_calls = 0;
71 #define TRACE_CALL(fs,...) \
73 fprintf (stderr, "%s: %s (" fs ")\n", \
74 program_name, __func__, __VA_ARGS__); \
80 return -guestfs_last_errno (g);
83 static struct guestfs_xattr_list *
84 copy_xattr_list (const struct guestfs_xattr *first, size_t num)
86 struct guestfs_xattr_list *xattrs;
88 xattrs = malloc (sizeof *xattrs);
95 xattrs->val = malloc (num * sizeof (struct guestfs_xattr));
96 if (xattrs->val == NULL) {
103 for (i = 0; i < num; ++i) {
104 xattrs->val[i].attrname = strdup (first[i].attrname);
105 xattrs->val[i].attrval_len = first[i].attrval_len;
106 xattrs->val[i].attrval = malloc (first[i].attrval_len);
107 memcpy (xattrs->val[i].attrval, first[i].attrval, first[i].attrval_len);
114 fg_readdir (const char *path, void *buf, fuse_fill_dir_t filler,
115 off_t offset, struct fuse_file_info *fi)
117 TRACE_CALL ("%s, %p, %ld", path, buf, (long) offset);
122 dir_cache_remove_all_expired (now);
124 struct guestfs_dirent_list *ents;
126 ents = guestfs_readdir (g, path);
131 for (i = 0; i < ents->len; ++i) {
133 memset (&stat, 0, sizeof stat);
135 stat.st_ino = ents->val[i].ino;
136 switch (ents->val[i].ftyp) {
137 case 'b': stat.st_mode = S_IFBLK; break;
138 case 'c': stat.st_mode = S_IFCHR; break;
139 case 'd': stat.st_mode = S_IFDIR; break;
140 case 'f': stat.st_mode = S_IFIFO; break;
141 case 'l': stat.st_mode = S_IFLNK; break;
142 case 'r': stat.st_mode = S_IFREG; break;
143 case 's': stat.st_mode = S_IFSOCK; break;
146 default: stat.st_mode = 0;
149 /* Copied from the example, which also ignores 'offset'. I'm
150 * not quite sure how this is ever supposed to work on large
153 if (filler (buf, ents->val[i].name, &stat, 0))
157 /* Now prepopulate the directory caches. This step is just an
158 * optimization, don't worry if it fails.
160 char **names = malloc ((ents->len + 1) * sizeof (char *));
162 for (i = 0; i < ents->len; ++i)
163 names[i] = ents->val[i].name;
166 struct guestfs_stat_list *ss = guestfs_lstatlist (g, path, names);
168 for (i = 0; i < ss->len; ++i) {
169 if (ss->val[i].ino >= 0) {
172 statbuf.st_dev = ss->val[i].dev;
173 statbuf.st_ino = ss->val[i].ino;
174 statbuf.st_mode = ss->val[i].mode;
175 statbuf.st_nlink = ss->val[i].nlink;
176 statbuf.st_uid = ss->val[i].uid;
177 statbuf.st_gid = ss->val[i].gid;
178 statbuf.st_rdev = ss->val[i].rdev;
179 statbuf.st_size = ss->val[i].size;
180 statbuf.st_blksize = ss->val[i].blksize;
181 statbuf.st_blocks = ss->val[i].blocks;
182 statbuf.st_atime = ss->val[i].atime;
183 statbuf.st_mtime = ss->val[i].mtime;
184 statbuf.st_ctime = ss->val[i].ctime;
186 lsc_insert (path, names[i], now, &statbuf);
189 guestfs_free_stat_list (ss);
192 struct guestfs_xattr_list *xattrs = guestfs_lxattrlist (g, path, names);
195 struct guestfs_xattr *first;
196 struct guestfs_xattr_list *copy;
197 for (i = 0, ni = 0; i < xattrs->len; ++i, ++ni) {
198 assert (strlen (xattrs->val[i].attrname) == 0);
199 if (xattrs->val[i].attrval_len > 0) {
201 first = &xattrs->val[i];
203 for (; i < xattrs->len && strlen (xattrs->val[i].attrname) > 0; ++i)
206 copy = copy_xattr_list (first, num);
208 xac_insert (path, names[ni], now, copy);
213 guestfs_free_xattr_list (xattrs);
216 char **links = guestfs_readlinklist (g, path, names);
218 for (i = 0; names[i] != NULL; ++i) {
220 /* Note that rlc_insert owns the string links[i] after this, */
221 rlc_insert (path, names[i], now, links[i]);
223 /* which is why we have to free links[i] here. */
226 free (links); /* free the array, not the strings */
232 guestfs_free_dirent_list (ents);
238 fg_getattr (const char *path, struct stat *statbuf)
240 TRACE_CALL ("%s, %p", path, statbuf);
242 const struct stat *buf;
244 buf = lsc_lookup (path);
246 memcpy (statbuf, buf, sizeof *statbuf);
250 struct guestfs_stat *r;
252 r = guestfs_lstat (g, path);
256 statbuf->st_dev = r->dev;
257 statbuf->st_ino = r->ino;
258 statbuf->st_mode = r->mode;
259 statbuf->st_nlink = r->nlink;
260 statbuf->st_uid = r->uid;
261 statbuf->st_gid = r->gid;
262 statbuf->st_rdev = r->rdev;
263 statbuf->st_size = r->size;
264 statbuf->st_blksize = r->blksize;
265 statbuf->st_blocks = r->blocks;
266 statbuf->st_atime = r->atime;
267 statbuf->st_mtime = r->mtime;
268 statbuf->st_ctime = r->ctime;
270 guestfs_free_stat (r);
275 /* Nautilus loves to use access(2) to test everything about a file,
276 * such as whether it's executable. Therefore treat this a lot like
280 fg_access (const char *path, int mask)
282 TRACE_CALL ("%s, %d", path, mask);
287 if (read_only && (mask & W_OK))
290 r = fg_getattr (path, &statbuf);
291 if (r < 0 || mask == F_OK)
294 struct fuse_context *fuse = fuse_get_context ();
299 ( fuse->uid == statbuf.st_uid ? statbuf.st_mode & S_IRUSR
300 : fuse->gid == statbuf.st_gid ? statbuf.st_mode & S_IRGRP
301 : statbuf.st_mode & S_IROTH);
304 ( fuse->uid == statbuf.st_uid ? statbuf.st_mode & S_IWUSR
305 : fuse->gid == statbuf.st_gid ? statbuf.st_mode & S_IWGRP
306 : statbuf.st_mode & S_IWOTH);
309 ( fuse->uid == statbuf.st_uid ? statbuf.st_mode & S_IXUSR
310 : fuse->gid == statbuf.st_gid ? statbuf.st_mode & S_IXGRP
311 : statbuf.st_mode & S_IXOTH);
313 return ok ? 0 : -EACCES;
317 fg_readlink (const char *path, char *buf, size_t size)
319 TRACE_CALL ("%s, %p, %zu", path, buf, size);
324 r = rlc_lookup (path);
326 r = guestfs_readlink (g, path);
332 /* Note this is different from the real readlink(2) syscall. FUSE wants
333 * the string to be always nul-terminated, even if truncated.
335 size_t len = strlen (r);
339 memcpy (buf, r, len);
343 char *tmp = (char *) r;
351 fg_mknod (const char *path, mode_t mode, dev_t rdev)
353 TRACE_CALL ("%s, 0%o, 0x%lx", path, mode, (long) rdev);
357 if (read_only) return -EROFS;
359 dir_cache_invalidate (path);
361 r = guestfs_mknod (g, mode, major (rdev), minor (rdev), path);
369 fg_mkdir (const char *path, mode_t mode)
371 TRACE_CALL ("%s, 0%o", path, mode);
375 if (read_only) return -EROFS;
377 dir_cache_invalidate (path);
379 r = guestfs_mkdir_mode (g, path, mode);
387 fg_unlink (const char *path)
389 TRACE_CALL ("%s", path);
393 if (read_only) return -EROFS;
395 dir_cache_invalidate (path);
397 r = guestfs_rm (g, path);
405 fg_rmdir (const char *path)
407 TRACE_CALL ("%s", path);
411 if (read_only) return -EROFS;
413 dir_cache_invalidate (path);
415 r = guestfs_rmdir (g, path);
423 fg_symlink (const char *from, const char *to)
425 TRACE_CALL ("%s, %s", from, to);
429 if (read_only) return -EROFS;
431 dir_cache_invalidate (to);
433 r = guestfs_ln_s (g, from, to);
441 fg_rename (const char *from, const char *to)
443 TRACE_CALL ("%s, %s", from, to);
447 if (read_only) return -EROFS;
449 dir_cache_invalidate (from);
450 dir_cache_invalidate (to);
452 /* XXX It's not clear how close the 'mv' command is to the
453 * rename syscall. We might need to add the rename syscall
454 * to the guestfs(3) API.
456 r = guestfs_mv (g, from, to);
464 fg_link (const char *from, const char *to)
466 TRACE_CALL ("%s, %s", from, to);
470 if (read_only) return -EROFS;
472 dir_cache_invalidate (from);
473 dir_cache_invalidate (to);
475 r = guestfs_ln (g, from, to);
483 fg_chmod (const char *path, mode_t mode)
485 TRACE_CALL ("%s, 0%o", path, mode);
489 if (read_only) return -EROFS;
491 dir_cache_invalidate (path);
493 r = guestfs_chmod (g, mode, path);
501 fg_chown (const char *path, uid_t uid, gid_t gid)
503 TRACE_CALL ("%s, %ld, %ld", path, (long) uid, (long) gid);
507 if (read_only) return -EROFS;
509 dir_cache_invalidate (path);
511 r = guestfs_lchown (g, uid, gid, path);
519 fg_truncate (const char *path, off_t size)
521 TRACE_CALL ("%s, %ld", path, (long) size);
525 if (read_only) return -EROFS;
527 dir_cache_invalidate (path);
529 r = guestfs_truncate_size (g, path, size);
537 fg_utimens (const char *path, const struct timespec ts[2])
539 TRACE_CALL ("%s, [{ %ld, %ld }, { %ld, %ld }]",
540 path, ts[0].tv_sec, ts[0].tv_nsec, ts[1].tv_sec, ts[1].tv_nsec);
544 if (read_only) return -EROFS;
546 dir_cache_invalidate (path);
548 time_t atsecs = ts[0].tv_sec;
549 long atnsecs = ts[0].tv_nsec;
550 time_t mtsecs = ts[1].tv_sec;
551 long mtnsecs = ts[1].tv_nsec;
554 if (atnsecs == UTIME_NOW)
558 if (atnsecs == UTIME_OMIT)
562 if (mtnsecs == UTIME_NOW)
566 if (mtnsecs == UTIME_OMIT)
570 r = guestfs_utimens (g, path, atsecs, atnsecs, mtsecs, mtnsecs);
577 /* All this function needs to do is to check that the requested open
578 * flags are valid. See the notes in <fuse/fuse.h>.
581 fg_open (const char *path, struct fuse_file_info *fi)
583 TRACE_CALL ("%s, 0%o", path, fi->flags);
585 int flags = fi->flags & 3;
587 if (read_only && flags != O_RDONLY)
594 fg_read (const char *path, char *buf, size_t size, off_t offset,
595 struct fuse_file_info *fi)
597 TRACE_CALL ("%s, %p, %zu, %ld", path, buf, size, offset);
603 fprintf (stderr, "fg_read: %s: size %zu offset %ju\n",
606 /* The guestfs protocol limits size to somewhere over 2MB. We just
607 * reduce the requested size here accordingly and push the problem
608 * up to every user. http://www.jwz.org/doc/worse-is-better.html
610 const size_t limit = 2 * 1024 * 1024;
614 r = guestfs_pread (g, path, size, offset, &rsize);
618 /* This should never happen, but at least it stops us overflowing
619 * the output buffer if it does happen.
624 memcpy (buf, r, rsize);
631 fg_write (const char *path, const char *buf, size_t size,
632 off_t offset, struct fuse_file_info *fi)
634 TRACE_CALL ("%s, %p, %zu, %ld", path, buf, size, offset);
636 if (read_only) return -EROFS;
638 dir_cache_invalidate (path);
641 const size_t limit = 2 * 1024 * 1024;
646 r = guestfs_pwrite (g, path, buf, size, offset);
654 fg_statfs (const char *path, struct statvfs *stbuf)
656 TRACE_CALL ("%s, %p", path, stbuf);
658 struct guestfs_statvfs *r;
660 r = guestfs_statvfs (g, path);
664 stbuf->f_bsize = r->bsize;
665 stbuf->f_frsize = r->frsize;
666 stbuf->f_blocks = r->blocks;
667 stbuf->f_bfree = r->bfree;
668 stbuf->f_bavail = r->bavail;
669 stbuf->f_files = r->files;
670 stbuf->f_ffree = r->ffree;
671 stbuf->f_favail = r->favail;
672 stbuf->f_fsid = r->fsid;
673 stbuf->f_flag = r->flag;
674 stbuf->f_namemax = r->namemax;
676 guestfs_free_statvfs (r);
682 fg_release (const char *path, struct fuse_file_info *fi)
684 TRACE_CALL ("%s", path);
686 /* Just a stub. This method is optional and can safely be left
692 /* Emulate this by calling sync. */
693 static int fg_fsync(const char *path, int isdatasync,
694 struct fuse_file_info *fi)
696 TRACE_CALL ("%s, %d", path, isdatasync);
700 r = guestfs_sync (g);
708 fg_setxattr (const char *path, const char *name, const char *value,
709 size_t size, int flags)
711 TRACE_CALL ("%s, %s, %p, %zu", path, name, value, size);
715 if (read_only) return -EROFS;
717 dir_cache_invalidate (path);
719 /* XXX Underlying guestfs(3) API doesn't understand the flags. */
720 r = guestfs_lsetxattr (g, name, value, size, path);
727 /* The guestfs(3) API for getting xattrs is much easier to use
728 * than the real syscall. Unfortunately we now have to emulate
729 * the real syscall using that API :-(
732 fg_getxattr (const char *path, const char *name, char *value,
735 TRACE_CALL ("%s, %s, %p, %zu", path, name, value, size);
737 const struct guestfs_xattr_list *xattrs;
740 xattrs = xac_lookup (path);
741 if (xattrs == NULL) {
742 xattrs = guestfs_lgetxattrs (g, path);
750 for (i = 0; i < xattrs->len; ++i) {
751 if (STREQ (xattrs->val[i].attrname, name)) {
752 size_t sz = xattrs->val[i].attrval_len;
755 memcpy (value, xattrs->val[i].attrval, sz);
762 guestfs_free_xattr_list ((struct guestfs_xattr_list *) xattrs);
767 /* Ditto as above. */
769 fg_listxattr (const char *path, char *list, size_t size)
771 TRACE_CALL ("%s, %p, %zu", path, list, size);
773 const struct guestfs_xattr_list *xattrs;
776 xattrs = xac_lookup (path);
777 if (xattrs == NULL) {
778 xattrs = guestfs_lgetxattrs (g, path);
786 for (i = 0; i < xattrs->len; ++i) {
787 size_t len = strlen (xattrs->val[i].attrname) + 1;
789 memcpy (list, xattrs->val[i].attrname, len);
800 guestfs_free_xattr_list ((struct guestfs_xattr_list *) xattrs);
806 fg_removexattr(const char *path, const char *name)
808 TRACE_CALL ("%s, %s", path, name);
812 if (read_only) return -EROFS;
814 dir_cache_invalidate (path);
816 r = guestfs_lremovexattr (g, name, path);
823 static struct fuse_operations fg_operations = {
824 .getattr = fg_getattr,
826 .readlink = fg_readlink,
827 .readdir = fg_readdir,
830 .symlink = fg_symlink,
837 .truncate = fg_truncate,
838 .utimens = fg_utimens,
843 .release = fg_release,
845 .setxattr = fg_setxattr,
846 .getxattr = fg_getxattr,
847 .listxattr = fg_listxattr,
848 .removexattr = fg_removexattr,
851 static void __attribute__((noreturn))
854 const char *tmp_argv[] = { program_name, "--help", NULL };
855 fuse_main (2, (char **) tmp_argv, &fg_operations, NULL);
859 static void __attribute__((noreturn))
862 if (status != EXIT_SUCCESS)
863 fprintf (stderr, _("Try `%s --help' for more information.\n"),
867 _("%s: FUSE module for libguestfs\n"
868 "%s lets you mount a virtual machine filesystem\n"
869 "Copyright (C) 2009-2010 Red Hat Inc.\n"
871 " %s [--options] [-- [--FUSE-options]] mountpoint\n"
873 " -a|--add image Add image\n"
874 " -c|--connect uri Specify libvirt URI for -d option\n"
875 " --dir-cache-timeout Set readdir cache timeout (default 5 sec)\n"
876 " -d|--domain guest Add disks from libvirt guest\n"
877 " --echo-keys Don't turn off echo for passphrases\n"
878 " --format[=raw|..] Force disk format for -a option\n"
879 " --fuse-help Display extra FUSE options\n"
880 " -i|--inspector Automatically mount filesystems\n"
881 " --help Display help message and exit\n"
882 " --keys-from-stdin Read passphrases from stdin\n"
883 " --live Connect to a live virtual machine\n"
884 " -m|--mount dev[:mnt] Mount dev on mnt (if omitted, /)\n"
885 " -n|--no-sync Don't autosync\n"
886 " -o|--option opt Pass extra option to FUSE\n"
887 " -r|--ro Mount read-only\n"
888 " --selinux Enable SELinux support\n"
889 " -v|--verbose Verbose messages\n"
890 " -V|--version Display version and exit\n"
891 " -x|--trace Trace guestfs API calls\n"
893 program_name, program_name, program_name);
899 main (int argc, char *argv[])
901 setlocale (LC_ALL, "");
902 bindtextdomain (PACKAGE, LOCALEBASEDIR);
903 textdomain (PACKAGE);
905 enum { HELP_OPTION = CHAR_MAX + 1 };
907 /* The command line arguments are broadly compatible with (a subset
908 * of) guestfish. Thus we have to deal mainly with -a, -m and --ro.
910 static const char *options = "a:c:d:im:no:rv?Vwx";
911 static const struct option long_options[] = {
912 { "add", 1, 0, 'a' },
913 { "connect", 1, 0, 'c' },
914 { "dir-cache-timeout", 1, 0, 0 },
915 { "domain", 1, 0, 'd' },
916 { "echo-keys", 0, 0, 0 },
917 { "format", 2, 0, 0 },
918 { "fuse-help", 0, 0, 0 },
919 { "help", 0, 0, HELP_OPTION },
920 { "inspector", 0, 0, 'i' },
921 { "keys-from-stdin", 0, 0, 0 },
923 { "mount", 1, 0, 'm' },
924 { "no-sync", 0, 0, 'n' },
925 { "option", 1, 0, 'o' },
928 { "selinux", 0, 0, 0 },
929 { "trace", 0, 0, 'x' },
930 { "verbose", 0, 0, 'v' },
931 { "version", 0, 0, 'V' },
935 struct drv *drvs = NULL;
937 struct mp *mps = NULL;
940 const char *format = NULL;
946 const char **fuse_argv = NULL;
948 #define ADD_FUSE_ARG(str) \
951 fuse_argv = realloc (fuse_argv, (1+fuse_argc) * sizeof (char *)); \
953 perror ("realloc"); \
954 exit (EXIT_FAILURE); \
956 fuse_argv[fuse_argc-1] = (str); \
957 fuse_argv[fuse_argc] = NULL; \
960 /* LC_ALL=C is required so we can parse error messages. */
961 setenv ("LC_ALL", "C", 1);
963 /* Set global program name that is not polluted with libtool artifacts. */
964 set_program_name (argv[0]);
966 memset (&sa, 0, sizeof sa);
967 sa.sa_handler = SIG_IGN;
968 sa.sa_flags = SA_RESTART;
969 sigaction (SIGPIPE, &sa, NULL);
971 /* Various initialization. */
974 g = guestfs_create ();
976 fprintf (stderr, _("guestfs_create: failed to create handle\n"));
980 guestfs_set_recovery_proc (g, 0);
982 ADD_FUSE_ARG (program_name);
983 /* MUST be single-threaded. You cannot have two threads accessing the
984 * same libguestfs handle, and opening more than one handle is likely
985 * to be very expensive.
989 /* If developing, add ./appliance to the path. Note that libtools
990 * interferes with this because uninstalled guestfish is a shell
991 * script that runs the real program with an absolute path. Detect
994 * BUT if LIBGUESTFS_PATH environment variable is already set by
995 * the user, then don't override it.
997 if (getenv ("LIBGUESTFS_PATH") == NULL &&
999 (argv[0][0] != '/' || strstr (argv[0], "/.libs/lt-") != NULL))
1000 guestfs_set_path (g, "appliance:" GUESTFS_DEFAULT_PATH);
1003 c = getopt_long (argc, argv, options, long_options, &option_index);
1007 case 0: /* options which are long only */
1008 if (STREQ (long_options[option_index].name, "dir-cache-timeout"))
1009 dir_cache_timeout = atoi (optarg);
1010 else if (STREQ (long_options[option_index].name, "fuse-help"))
1012 else if (STREQ (long_options[option_index].name, "selinux"))
1013 guestfs_set_selinux (g, 1);
1014 else if (STREQ (long_options[option_index].name, "format")) {
1015 if (!optarg || STREQ (optarg, ""))
1019 } else if (STREQ (long_options[option_index].name, "keys-from-stdin")) {
1020 keys_from_stdin = 1;
1021 } else if (STREQ (long_options[option_index].name, "echo-keys")) {
1023 } else if (STREQ (long_options[option_index].name, "live")) {
1026 fprintf (stderr, _("%s: unknown long option: %s (%d)\n"),
1027 program_name, long_options[option_index].name, option_index);
1028 exit (EXIT_FAILURE);
1057 ADD_FUSE_ARG ("-o");
1058 ADD_FUSE_ARG (optarg);
1079 ADD_FUSE_ARG ("-f");
1080 guestfs_set_recovery_proc (g, 1);
1085 usage (EXIT_SUCCESS);
1088 usage (EXIT_FAILURE);
1092 /* Check we have the right options. */
1093 if (!drvs || !(mps || inspector)) {
1095 _("%s: must have at least one -a/-d and at least one -m/-i option\n"),
1097 exit (EXIT_FAILURE);
1100 /* We'd better have a mountpoint. */
1101 if (optind+1 != argc) {
1103 _("%s: you must specify a mountpoint in the host filesystem\n"),
1105 exit (EXIT_FAILURE);
1108 /* Do the guest drives and mountpoints. */
1109 add_drives (drvs, 'a');
1110 if (guestfs_launch (g) == -1)
1111 exit (EXIT_FAILURE);
1119 /* FUSE example does this, not clear if it's necessary, but ... */
1120 if (guestfs_umask (g, 0) == -1)
1121 exit (EXIT_FAILURE);
1123 /* At the last minute, remove the libguestfs error handler. In code
1124 * above this point, the default error handler has been used which
1125 * sends all errors to stderr. Now before entering FUSE itself we
1126 * want to silence errors so we can convert them (see error()
1129 guestfs_set_error_handler (g, NULL, NULL);
1131 /* Finish off FUSE args. */
1132 ADD_FUSE_ARG (argv[optind]);
1135 It says about the line containing the for-statement:
1136 error: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow]
1139 fprintf (stderr, "guestmount: invoking FUSE with args [");
1140 for (i = 0; i < fuse_argc; ++i) {
1141 if (i > 0) fprintf (stderr, ", ");
1142 fprintf (stderr, "%s", fuse_argv[i]);
1144 fprintf (stderr, "]\n");
1148 r = fuse_main (fuse_argc, (char **) fuse_argv, &fg_operations, NULL);
1154 exit (r == -1 ? 1 : 0);