2010-02-15 00:22:52 +01:00
|
|
|
#include "wbfs_ntfs.h"
|
|
|
|
#include "fatmounter.h"
|
|
|
|
#include "libntfs/ntfs.h"
|
|
|
|
|
|
|
|
s32 Wbfs_Ntfs::Open()
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
strcpy(wbfs_fs_drive, "NTFS:");
|
|
|
|
return MountNTFS(lba);
|
2010-02-15 00:22:52 +01:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
int Wbfs_Ntfs::GetFragList(char *filename, _frag_append_t append_fragment, FragList *fs)
|
2010-02-15 00:22:52 +01:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int ret = _NTFS_get_fragments(filename, append_fragment, fs);
|
|
|
|
if (ret)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
return ret;
|
|
|
|
}
|
2010-02-15 00:22:52 +01:00
|
|
|
|
2010-09-19 01:16:05 +02:00
|
|
|
// offset to start of partition
|
2010-09-24 02:48:03 +02:00
|
|
|
for (unsigned int j = 0; j < fs->num; j++)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
fs->frag[j].sector += fs_ntfs_sec;
|
|
|
|
}
|
|
|
|
return ret;
|
2010-02-15 00:22:52 +01:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
bool Wbfs_Ntfs::ShowFreeSpace(void)
|
2010-02-15 00:22:52 +01:00
|
|
|
{
|
2010-09-19 01:16:05 +02:00
|
|
|
return true;
|
2010-02-15 00:22:52 +01:00
|
|
|
}
|