hurdextras-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to libfuse/main.c


From: Stefan Siegl
Subject: Changes to libfuse/main.c
Date: Sat, 03 Dec 2005 14:16:49 -0500

Index: libfuse/main.c
diff -u libfuse/main.c:1.10 libfuse/main.c:1.11
--- libfuse/main.c:1.10 Sat Dec  3 19:01:25 2005
+++ libfuse/main.c      Sat Dec  3 19:16:49 2005
@@ -55,7 +55,7 @@
   int opt;
   FILE *opt_help = NULL;
 
-  while((opt = getopt(argc, argv, "d::h")) >= 0)
+  while((opt = getopt(argc, argv, "d::hs")) >= 0)
     switch(opt)
       {
       case 'd':
@@ -72,6 +72,10 @@
        opt_help = stdout;
        break;
 
+      case 's':
+       libfuse_params.disable_mt = 1;
+       break;
+
       case '?':
       default:
        opt_help = stderr;
@@ -84,6 +88,7 @@
              "\nusage: %s [options]\n\n"
              "Options:\n"
              "    -d[FILENAME]        enable debug output (default=stderr)\n"
+             "    -s                  disable multi-threaded operation\n"
              "    -h                  print help\n"
              "\n", translat_path);
 
@@ -102,7 +107,8 @@
 {
   const char *fs_opts = fuse_parse_argv(argc, argv);
   int fd = fuse_mount(NULL, NULL);
-  return fuse_loop(fuse_new_compat2(fd, fs_opts, op));
+  return (libfuse_params.disable_mt ? fuse_loop : fuse_loop_mt)
+    (fuse_new_compat2(fd, fs_opts, op));
 }
 
 
@@ -115,7 +121,8 @@
 {
   const char *fs_opts = fuse_parse_argv(argc, argv);
   int fd = fuse_mount(NULL, NULL);
-  return fuse_loop(fuse_new(fd, fs_opts, op, op_size));
+  return (libfuse_params.disable_mt ? fuse_loop : fuse_loop_mt)
+    (fuse_new(fd, fs_opts, op, op_size));
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]