__attribute__(constructor) doesn't seem to work with gcc 2.95.3, so we
invoke driver_settings_init() manually now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21247 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -598,15 +598,16 @@ find_driver_settings(const char *name)
|
||||
}
|
||||
|
||||
|
||||
static fssh_status_t driver_settings_init_post_sem()
|
||||
__attribute__((constructor));
|
||||
namespace FSShell {
|
||||
|
||||
static fssh_status_t
|
||||
driver_settings_init_post_sem()
|
||||
fssh_status_t
|
||||
driver_settings_init()
|
||||
{
|
||||
return mutex_init(&sLock, "driver settings");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - public API
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2007, Ingo Weinhold, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _FSSH_DRIVER_SETTINGS_PRIV_H
|
||||
#define _FSSH_DRIVER_SETTINGS_PRIV_H
|
||||
|
||||
|
||||
#include "fssh_defs.h"
|
||||
|
||||
|
||||
namespace FSShell {
|
||||
|
||||
|
||||
fssh_status_t driver_settings_init();
|
||||
|
||||
|
||||
} // namespace FSShell
|
||||
|
||||
|
||||
#endif // _FSSH_DRIVER_SETTINGS_PRIV_H
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "command_cp.h"
|
||||
#include "driver_settings.h"
|
||||
#include "external_commands.h"
|
||||
#include "fd.h"
|
||||
#include "fssh_dirent.h"
|
||||
@@ -57,6 +58,14 @@ init_kernel()
|
||||
return error;
|
||||
}
|
||||
|
||||
// init driver settings
|
||||
error = driver_settings_init();
|
||||
if (error != FSSH_B_OK) {
|
||||
fprintf(stderr, "initializing driver settings failed: %s\n",
|
||||
fssh_strerror(error));
|
||||
return error;
|
||||
}
|
||||
|
||||
// register built-in modules, i.e. the rootfs and the client FS
|
||||
register_builtin_module(&gRootFileSystem.info);
|
||||
for (int i = 0; modules[i]; i++)
|
||||
|
||||
Reference in New Issue
Block a user