Fossil SCM
Remove even fusefs command from non fuse-enabled builds
Commit
06fd798bdcb9da50671a0ba732c36c76c2a8256f
Parent
9a091248757ae42…
1 file changed
+2
-6
+2
-6
| --- src/fusefs.c | ||
| +++ src/fusefs.c | ||
| @@ -20,20 +20,20 @@ | ||
| 20 | 20 | ** |
| 21 | 21 | ** This module is a mostly a no-op unless compiled with -DFOSSIL_HAVE_FUSEFS. |
| 22 | 22 | ** The FOSSIL_HAVE_FUSEFS should be omitted on systems that lack support for |
| 23 | 23 | ** the Fuse Filesystem, of course. |
| 24 | 24 | */ |
| 25 | +#ifdef FOSSIL_HAVE_FUSEFS | |
| 25 | 26 | #include "config.h" |
| 26 | 27 | #include <stdio.h> |
| 27 | 28 | #include <string.h> |
| 28 | 29 | #include <errno.h> |
| 29 | 30 | #include <fcntl.h> |
| 30 | 31 | #include <stdlib.h> |
| 31 | 32 | #include <unistd.h> |
| 32 | 33 | #include <sys/types.h> |
| 33 | 34 | #include "fusefs.h" |
| 34 | -#ifdef FOSSIL_HAVE_FUSEFS | |
| 35 | 35 | |
| 36 | 36 | #define FUSE_USE_VERSION 26 |
| 37 | 37 | #include <fuse.h> |
| 38 | 38 | |
| 39 | 39 | /* |
| @@ -282,11 +282,10 @@ | ||
| 282 | 282 | static struct fuse_operations fusefs_methods = { |
| 283 | 283 | .getattr = fusefs_getattr, |
| 284 | 284 | .readdir = fusefs_readdir, |
| 285 | 285 | .read = fusefs_read, |
| 286 | 286 | }; |
| 287 | -#endif /* FOSSIL_HAVE_FUSEFS */ | |
| 288 | 287 | |
| 289 | 288 | /* |
| 290 | 289 | ** COMMAND: fusefs |
| 291 | 290 | ** |
| 292 | 291 | ** Usage: %fossil fusefs [--debug] DIRECTORY |
| @@ -314,13 +313,10 @@ | ||
| 314 | 313 | ** After stopping the "fossil fusefs" command, it might also be necessary |
| 315 | 314 | ** to run "fusermount -u DIRECTORY" to reset the FuseFS before using it |
| 316 | 315 | ** again. |
| 317 | 316 | */ |
| 318 | 317 | 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 | 318 | char *zMountPoint; |
| 323 | 319 | char *azNewArgv[5]; |
| 324 | 320 | int doDebug = find_option("debug","d",0)!=0; |
| 325 | 321 | |
| 326 | 322 | db_find_and_open_repository(0,0); |
| @@ -338,7 +334,7 @@ | ||
| 338 | 334 | azNewArgv[4] = 0; |
| 339 | 335 | g.localOpen = 0; /* Prevent tags like "current" and "prev" */ |
| 340 | 336 | fuse_main(4, azNewArgv, &fusefs_methods, NULL); |
| 341 | 337 | fusefs_reset(); |
| 342 | 338 | fusefs_clear_path(); |
| 343 | -#endif | |
| 344 | 339 | } |
| 340 | +#endif /* FOSSIL_HAVE_FUSEFS */ | |
| 345 | 341 |
| --- 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 |