Fossil SCM

Remove even fusefs command from non fuse-enabled builds

baruch 2016-01-20 12:15 trunk
Commit 06fd798bdcb9da50671a0ba732c36c76c2a8256f
1 file changed +2 -6
+2 -6
--- src/fusefs.c
+++ src/fusefs.c
@@ -20,20 +20,20 @@
2020
**
2121
** This module is a mostly a no-op unless compiled with -DFOSSIL_HAVE_FUSEFS.
2222
** The FOSSIL_HAVE_FUSEFS should be omitted on systems that lack support for
2323
** the Fuse Filesystem, of course.
2424
*/
25
+#ifdef FOSSIL_HAVE_FUSEFS
2526
#include "config.h"
2627
#include <stdio.h>
2728
#include <string.h>
2829
#include <errno.h>
2930
#include <fcntl.h>
3031
#include <stdlib.h>
3132
#include <unistd.h>
3233
#include <sys/types.h>
3334
#include "fusefs.h"
34
-#ifdef FOSSIL_HAVE_FUSEFS
3535
3636
#define FUSE_USE_VERSION 26
3737
#include <fuse.h>
3838
3939
/*
@@ -282,11 +282,10 @@
282282
static struct fuse_operations fusefs_methods = {
283283
.getattr = fusefs_getattr,
284284
.readdir = fusefs_readdir,
285285
.read = fusefs_read,
286286
};
287
-#endif /* FOSSIL_HAVE_FUSEFS */
288287
289288
/*
290289
** COMMAND: fusefs
291290
**
292291
** Usage: %fossil fusefs [--debug] DIRECTORY
@@ -314,13 +313,10 @@
314313
** After stopping the "fossil fusefs" command, it might also be necessary
315314
** to run "fusermount -u DIRECTORY" to reset the FuseFS before using it
316315
** again.
317316
*/
318317
void fusefs_cmd(void){
319
-#ifndef FOSSIL_HAVE_FUSEFS
320
- fossil_fatal("this build of fossil does not support the fuse filesystem");
321
-#else
322318
char *zMountPoint;
323319
char *azNewArgv[5];
324320
int doDebug = find_option("debug","d",0)!=0;
325321
326322
db_find_and_open_repository(0,0);
@@ -338,7 +334,7 @@
338334
azNewArgv[4] = 0;
339335
g.localOpen = 0; /* Prevent tags like "current" and "prev" */
340336
fuse_main(4, azNewArgv, &fusefs_methods, NULL);
341337
fusefs_reset();
342338
fusefs_clear_path();
343
-#endif
344339
}
340
+#endif /* FOSSIL_HAVE_FUSEFS */
345341
--- src/fusefs.c
+++ src/fusefs.c
@@ -20,20 +20,20 @@
20 **
21 ** This module is a mostly a no-op unless compiled with -DFOSSIL_HAVE_FUSEFS.
22 ** The FOSSIL_HAVE_FUSEFS should be omitted on systems that lack support for
23 ** the Fuse Filesystem, of course.
24 */
 
25 #include "config.h"
26 #include <stdio.h>
27 #include <string.h>
28 #include <errno.h>
29 #include <fcntl.h>
30 #include <stdlib.h>
31 #include <unistd.h>
32 #include <sys/types.h>
33 #include "fusefs.h"
34 #ifdef FOSSIL_HAVE_FUSEFS
35
36 #define FUSE_USE_VERSION 26
37 #include <fuse.h>
38
39 /*
@@ -282,11 +282,10 @@
282 static struct fuse_operations fusefs_methods = {
283 .getattr = fusefs_getattr,
284 .readdir = fusefs_readdir,
285 .read = fusefs_read,
286 };
287 #endif /* FOSSIL_HAVE_FUSEFS */
288
289 /*
290 ** COMMAND: fusefs
291 **
292 ** Usage: %fossil fusefs [--debug] DIRECTORY
@@ -314,13 +313,10 @@
314 ** After stopping the "fossil fusefs" command, it might also be necessary
315 ** to run "fusermount -u DIRECTORY" to reset the FuseFS before using it
316 ** again.
317 */
318 void fusefs_cmd(void){
319 #ifndef FOSSIL_HAVE_FUSEFS
320 fossil_fatal("this build of fossil does not support the fuse filesystem");
321 #else
322 char *zMountPoint;
323 char *azNewArgv[5];
324 int doDebug = find_option("debug","d",0)!=0;
325
326 db_find_and_open_repository(0,0);
@@ -338,7 +334,7 @@
338 azNewArgv[4] = 0;
339 g.localOpen = 0; /* Prevent tags like "current" and "prev" */
340 fuse_main(4, azNewArgv, &fusefs_methods, NULL);
341 fusefs_reset();
342 fusefs_clear_path();
343 #endif
344 }
 
345
--- src/fusefs.c
+++ src/fusefs.c
@@ -20,20 +20,20 @@
20 **
21 ** This module is a mostly a no-op unless compiled with -DFOSSIL_HAVE_FUSEFS.
22 ** The FOSSIL_HAVE_FUSEFS should be omitted on systems that lack support for
23 ** the Fuse Filesystem, of course.
24 */
25 #ifdef FOSSIL_HAVE_FUSEFS
26 #include "config.h"
27 #include <stdio.h>
28 #include <string.h>
29 #include <errno.h>
30 #include <fcntl.h>
31 #include <stdlib.h>
32 #include <unistd.h>
33 #include <sys/types.h>
34 #include "fusefs.h"
 
35
36 #define FUSE_USE_VERSION 26
37 #include <fuse.h>
38
39 /*
@@ -282,11 +282,10 @@
282 static struct fuse_operations fusefs_methods = {
283 .getattr = fusefs_getattr,
284 .readdir = fusefs_readdir,
285 .read = fusefs_read,
286 };
 
287
288 /*
289 ** COMMAND: fusefs
290 **
291 ** Usage: %fossil fusefs [--debug] DIRECTORY
@@ -314,13 +313,10 @@
313 ** After stopping the "fossil fusefs" command, it might also be necessary
314 ** to run "fusermount -u DIRECTORY" to reset the FuseFS before using it
315 ** again.
316 */
317 void fusefs_cmd(void){
 
 
 
318 char *zMountPoint;
319 char *azNewArgv[5];
320 int doDebug = find_option("debug","d",0)!=0;
321
322 db_find_and_open_repository(0,0);
@@ -338,7 +334,7 @@
334 azNewArgv[4] = 0;
335 g.localOpen = 0; /* Prevent tags like "current" and "prev" */
336 fuse_main(4, azNewArgv, &fusefs_methods, NULL);
337 fusefs_reset();
338 fusefs_clear_path();
 
339 }
340 #endif /* FOSSIL_HAVE_FUSEFS */
341

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button