WiiUPluginLoader/src/myutils/libntfs.cpp

41 lines
1.3 KiB
C++
Raw Normal View History

2018-09-22 19:52:52 +02:00
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <utils/logger.h>
#include "libntfs.h"
#include <iosuhax.h>
2019-05-14 22:28:30 +02:00
//#include <ntfs.h>
2018-09-22 19:52:52 +02:00
#include "common/retain_vars.h"
int32_t mountAllNTFS() {
2019-05-14 22:28:30 +02:00
/*int32_t i;
2018-09-22 19:52:52 +02:00
// Mount all NTFS volumes on all inserted block devices
ntfs_mount_count = ntfsMountAll((ntfs_md **) &ntfs_mounts, NTFS_DEFAULT | NTFS_RECOVER);
if (ntfs_mount_count == -1) {
DEBUG_FUNCTION_LINE("Error whilst mounting devices.\n");
} else if (ntfs_mount_count == 0) {
DEBUG_FUNCTION_LINE("No NTFS volumes were found and/or mounted.\n");
} else {
DEBUG_FUNCTION_LINE("%i NTFS volumes(s) mounted!\n", ntfs_mount_count);
}
// List all mounted NTFS volumes
for (i = 0; i < ntfs_mount_count; i++) {
DEBUG_FUNCTION_LINE("%i - %s:/ (%s)\n", i + 1, ((ntfs_md *)ntfs_mounts)[i].name, ntfsGetVolumeName(((ntfs_md *)ntfs_mounts)[i].name));
}
2019-05-14 22:28:30 +02:00
return ntfs_mount_count;*/
return 0;
2018-09-22 19:52:52 +02:00
}
int32_t unmountAllNTFS(void) {
2019-05-14 22:28:30 +02:00
/*if (ntfs_mounts) {
2018-09-22 19:52:52 +02:00
int32_t i = 0;
for (i = 0; i < ntfs_mount_count; i++) {
ntfsUnmount(((ntfs_md *)ntfs_mounts)[i].name, true);
}
free(ntfs_mounts);
ntfs_mounts = NULL;
ntfs_mount_count = 0;
2019-05-14 22:28:30 +02:00
}*/
2018-09-22 19:52:52 +02:00
return 0;
}