extern int LVM_Cleanup(void);
// === PROTOTYPES ===
-void DiskTool_Initialise(void) __attribute__((constructor(101)));
+void DiskTool_Initialise(void) __attribute__((constructor(102)));
void DiskTool_Cleanup(void);
int DiskTool_int_TranslateOpen(const char *File, int Mode);
int DiskTool_LVM_Read(void *Handle, Uint64 Block, size_t BlockCount, void *Dest);
}
len = strlen("/Native");
- len += strlen( gsWorkingDirectory ) + 1;
+ if( Path[0] != '/' )
+ len += strlen( gsWorkingDirectory ) + 1;
len += strlen(Path);
if( Buffer ) {
strcpy(Buffer, "/Native");
- strcat(Buffer, gsWorkingDirectory);
- strcat(Buffer, "/");
+ if( Path[0] != '/' ) {
+ strcat(Buffer, gsWorkingDirectory);
+ strcat(Buffer, "/");
+ }
strcat(Buffer, Path);
}
}
// === CODE ===
void Threads_int_Init(void)
{
- lpThreads_This = Threads_int_CreateTCB(NULL);
- Threads_SetName("ThreadZero");
+ if( !lpThreads_This ) {
+ lpThreads_This = Threads_int_CreateTCB(NULL);
+ Threads_SetName("ThreadZero");
+ }
}
tThread *Proc_GetCurThread(void)