* Initialize fuse_config before parsing the arguments.

* Implemented fuse_is_lib_option() more correctly.
* Actually use the value of the "use_ino" option.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29871 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-04-02 17:46:09 +00:00
parent 3093705388
commit a773113804
5 changed files with 26 additions and 15 deletions

View File

@ -243,6 +243,8 @@ FUSEFileSystem::FinishInitClientFS(fuse_config* config,
PRINT(("FUSEFileSystem::FinishInitClientFS()\n"));
fExitStatus = B_ERROR;
fFUSEConfig = *config;
// do the initialization
status_t error = _InitClientFS(ops, opSize, userData);

View File

@ -8,9 +8,7 @@
#include "../FileSystem.h"
#include "fuse_api.h"
struct fuse_config;
#include "fuse_config.h"
namespace UserlandFS {
@ -35,6 +33,8 @@ public:
fuse_fs* GetFS() const { return fFS; }
const fuse_config& GetFUSEConfig() const { return fFUSEConfig; }
virtual status_t CreateVolume(Volume** _volume, dev_t id);
virtual status_t DeleteVolume(Volume* volume);
@ -68,6 +68,7 @@ private:
const char* fInitParameters;
fuse_fs* fFS;
fuse_conn_info fConnectionInfo;
fuse_config fFUSEConfig;
FSVolumeCapabilities fVolumeCapabilities;
FSVNodeCapabilities fNodeCapabilities;

View File

@ -670,6 +670,9 @@ printf("FUSEVolume::Mount()\n");
fFS = _FileSystem()->GetFS();
_FileSystem()->GetVolumeCapabilities(fCapabilities);
const fuse_config& config = _FileSystem()->GetFUSEConfig();
fUseNodeIDs = config.use_ino;
// get the root node
struct stat st;
int fuseError = fuse_fs_getattr(fFS, "/", &st);

View File

@ -9,7 +9,7 @@
#include "fuse_config.h"
enum {
enum {
KEY_HELP,
};
@ -65,3 +65,11 @@ fuse_parse_config_args(struct fuse_args* args, struct fuse_config* config)
{
return fuse_opt_parse(args, config, fuse_lib_opts, fuse_lib_opt_proc) == 0;
}
int
fuse_is_lib_option(const char* opt)
{
return /*fuse_lowlevel_is_lib_option(opt) ||*/
fuse_opt_match(fuse_lib_opts, opt);
}

View File

@ -3,8 +3,7 @@
* Distributed under the terms of the MIT License.
*/
#define FUSE_USE_VERSION FUSE_VERSION
#include <signal.h>
#include <stdio.h>
#include "fuse_api.h"
@ -21,7 +20,14 @@ userData);
// parse args
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
fuse_config config;
memset(&config, 0, sizeof(config));
config.entry_timeout = 1.0;
config.attr_timeout = 1.0;
config.negative_timeout = 0.0;
config.intr_signal = SIGUSR1;
bool success = fuse_parse_config_args(&args, &config);
fuse_opt_free_args(&args);
@ -37,15 +43,6 @@ userData);
}
int
fuse_is_lib_option(const char* opt)
{
printf("fuse_is_lib_option(\"%s\")\n", opt);
// TODO: Implement!
return 0;
}
int
fuse_version(void)
{