From 232fe055878bf414f5bd175a81a12b8c627eafcf Mon Sep 17 00:00:00 2001 From: Pablo Curiel Date: Thu, 24 Dec 2020 07:16:16 -0400 Subject: [PATCH] Use LIBUSBHSFS_FS_TYPE_STR() macro from libusbhsfs instead of our own one. --- code_templates/nsp_dumper_stor.c | 4 ++-- source/ums.h | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/code_templates/nsp_dumper_stor.c b/code_templates/nsp_dumper_stor.c index efc689e..7e9ac3b 100644 --- a/code_templates/nsp_dumper_stor.c +++ b/code_templates/nsp_dumper_stor.c @@ -876,9 +876,9 @@ int main(int argc, char *argv[]) { if (ums_device->product_id[0]) { - sprintf(device_info, "%s, LUN %u, FS #%u, %s", ums_device->product_id, ums_device->lun, ums_device->fs_idx, UMS_FS_TYPE(ums_device->fs_type)); + sprintf(device_info, "%s, LUN %u, FS #%u, %s", ums_device->product_id, ums_device->lun, ums_device->fs_idx, LIBUSBHSFS_FS_TYPE_STR(ums_device->fs_type)); } else { - sprintf(device_info, "LUN %u, FS #%u, %s", ums_device->lun, ums_device->fs_idx, UMS_FS_TYPE(ums_device->fs_type)); + sprintf(device_info, "LUN %u, FS #%u, %s", ums_device->lun, ums_device->fs_idx, LIBUSBHSFS_FS_TYPE_STR(ums_device->fs_type)); } device_retrieved_info = true; diff --git a/source/ums.h b/source/ums.h index da01b8b..6d11a9b 100644 --- a/source/ums.h +++ b/source/ums.h @@ -25,10 +25,6 @@ #include -#define UMS_FS_TYPE(x) ((x) == UsbHsFsDeviceFileSystemType_FAT12 ? "FAT12" : ((x) == UsbHsFsDeviceFileSystemType_FAT16 ? "FAT16" : ((x) == UsbHsFsDeviceFileSystemType_FAT32 ? "FAT32" : \ - ((x) == UsbHsFsDeviceFileSystemType_exFAT ? "exFAT" : ((x) == UsbHsFsDeviceFileSystemType_NTFS ? "NTFS" : ((x) == UsbHsFsDeviceFileSystemType_EXT2 ? "EXT2" : \ - ((x) == UsbHsFsDeviceFileSystemType_EXT3 ? "EXT3" : ((x) == UsbHsFsDeviceFileSystemType_EXT4 ? "EXT4" : "Invalid")))))))) - /// Initializes the USB Mass Storage interface. bool umsInitialize(void);