Fossil SCM
Make the "fusefs" command and help text available, even on builds that lack support for FuseFS.
Commit
b1a78a65f61e6fcc90567c9b066e7cadce9467f9a6b32f0ab565480f455edeaf
Parent
82bbde8d0f3d600…
1 file changed
+5
-1
+5
-1
| --- src/fusefs.c | ||
| +++ src/fusefs.c | ||
| @@ -283,10 +283,11 @@ | ||
| 283 | 283 | static struct fuse_operations fusefs_methods = { |
| 284 | 284 | .getattr = fusefs_getattr, |
| 285 | 285 | .readdir = fusefs_readdir, |
| 286 | 286 | .read = fusefs_read, |
| 287 | 287 | }; |
| 288 | +#endif /* FOSSIL_HAVE_FUSEFS */ | |
| 288 | 289 | |
| 289 | 290 | /* |
| 290 | 291 | ** COMMAND: fusefs* |
| 291 | 292 | ** |
| 292 | 293 | ** Usage: %fossil fusefs [--debug] DIRECTORY |
| @@ -314,10 +315,11 @@ | ||
| 314 | 315 | ** After stopping the "fossil fusefs" command, it might also be necessary |
| 315 | 316 | ** to run "fusermount -u DIRECTORY" to reset the FuseFS before using it |
| 316 | 317 | ** again. |
| 317 | 318 | */ |
| 318 | 319 | void fusefs_cmd(void){ |
| 320 | +#ifdef FOSSIL_HAVE_FUSEFS | |
| 319 | 321 | char *zMountPoint; |
| 320 | 322 | char *azNewArgv[5]; |
| 321 | 323 | int doDebug = find_option("debug","d",0)!=0; |
| 322 | 324 | |
| 323 | 325 | db_find_and_open_repository(0,0); |
| @@ -335,12 +337,14 @@ | ||
| 335 | 337 | azNewArgv[4] = 0; |
| 336 | 338 | g.localOpen = 0; /* Prevent tags like "current" and "prev" */ |
| 337 | 339 | fuse_main(4, azNewArgv, &fusefs_methods, NULL); |
| 338 | 340 | fusefs_reset(); |
| 339 | 341 | fusefs_clear_path(); |
| 340 | -} | |
| 342 | +#else | |
| 343 | + fossil_fatal("The FuseFS is not available in this build."); | |
| 341 | 344 | #endif /* FOSSIL_HAVE_FUSEFS */ |
| 345 | +} | |
| 342 | 346 | |
| 343 | 347 | /* |
| 344 | 348 | ** Return version numbers for the FUSE header that was used at compile-time |
| 345 | 349 | ** and/or the FUSE library that was loaded at runtime. |
| 346 | 350 | */ |
| 347 | 351 |
| --- src/fusefs.c | |
| +++ src/fusefs.c | |
| @@ -283,10 +283,11 @@ | |
| 283 | static struct fuse_operations fusefs_methods = { |
| 284 | .getattr = fusefs_getattr, |
| 285 | .readdir = fusefs_readdir, |
| 286 | .read = fusefs_read, |
| 287 | }; |
| 288 | |
| 289 | /* |
| 290 | ** COMMAND: fusefs* |
| 291 | ** |
| 292 | ** Usage: %fossil fusefs [--debug] DIRECTORY |
| @@ -314,10 +315,11 @@ | |
| 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 | char *zMountPoint; |
| 320 | char *azNewArgv[5]; |
| 321 | int doDebug = find_option("debug","d",0)!=0; |
| 322 | |
| 323 | db_find_and_open_repository(0,0); |
| @@ -335,12 +337,14 @@ | |
| 335 | azNewArgv[4] = 0; |
| 336 | g.localOpen = 0; /* Prevent tags like "current" and "prev" */ |
| 337 | fuse_main(4, azNewArgv, &fusefs_methods, NULL); |
| 338 | fusefs_reset(); |
| 339 | fusefs_clear_path(); |
| 340 | } |
| 341 | #endif /* FOSSIL_HAVE_FUSEFS */ |
| 342 | |
| 343 | /* |
| 344 | ** Return version numbers for the FUSE header that was used at compile-time |
| 345 | ** and/or the FUSE library that was loaded at runtime. |
| 346 | */ |
| 347 |
| --- src/fusefs.c | |
| +++ src/fusefs.c | |
| @@ -283,10 +283,11 @@ | |
| 283 | static struct fuse_operations fusefs_methods = { |
| 284 | .getattr = fusefs_getattr, |
| 285 | .readdir = fusefs_readdir, |
| 286 | .read = fusefs_read, |
| 287 | }; |
| 288 | #endif /* FOSSIL_HAVE_FUSEFS */ |
| 289 | |
| 290 | /* |
| 291 | ** COMMAND: fusefs* |
| 292 | ** |
| 293 | ** Usage: %fossil fusefs [--debug] DIRECTORY |
| @@ -314,10 +315,11 @@ | |
| 315 | ** After stopping the "fossil fusefs" command, it might also be necessary |
| 316 | ** to run "fusermount -u DIRECTORY" to reset the FuseFS before using it |
| 317 | ** again. |
| 318 | */ |
| 319 | void fusefs_cmd(void){ |
| 320 | #ifdef FOSSIL_HAVE_FUSEFS |
| 321 | char *zMountPoint; |
| 322 | char *azNewArgv[5]; |
| 323 | int doDebug = find_option("debug","d",0)!=0; |
| 324 | |
| 325 | db_find_and_open_repository(0,0); |
| @@ -335,12 +337,14 @@ | |
| 337 | azNewArgv[4] = 0; |
| 338 | g.localOpen = 0; /* Prevent tags like "current" and "prev" */ |
| 339 | fuse_main(4, azNewArgv, &fusefs_methods, NULL); |
| 340 | fusefs_reset(); |
| 341 | fusefs_clear_path(); |
| 342 | #else |
| 343 | fossil_fatal("The FuseFS is not available in this build."); |
| 344 | #endif /* FOSSIL_HAVE_FUSEFS */ |
| 345 | } |
| 346 | |
| 347 | /* |
| 348 | ** Return version numbers for the FUSE header that was used at compile-time |
| 349 | ** and/or the FUSE library that was loaded at runtime. |
| 350 | */ |
| 351 |