Skip to content

Commit fd75dbc

Browse files
Bump version number.
1 parent 62059ce commit fd75dbc

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ Thanks to
162162
Changelog
163163
--------------
164164

165+
**v0.2.1:**
166+
167+
* Bugfix: mount name IDs are now properly freed while destroying filesystem contexts.
168+
* Library API: added a helper preprocessor macro to generate strings based on the supported filesystem type values.
169+
* Makefile: branch name is now retrieved using `rev-parse` instead of `symbolic-ref`. Fixes `ref HEAD is not a symbolic ref` errors while building the library when the repository is used as a git submodule.
170+
165171
**v0.2.0:**
166172

167173
* Built using libnx v4.0.0.

example/source/main.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
#include <threads.h>
88
#include <usbhsfs.h>
99

10-
#define FS_TYPE(x) ((x) == UsbHsFsDeviceFileSystemType_FAT12 ? "FAT12" : ((x) == UsbHsFsDeviceFileSystemType_FAT16 ? "FAT16" : ((x) == UsbHsFsDeviceFileSystemType_FAT32 ? "FAT32" : \
11-
((x) == UsbHsFsDeviceFileSystemType_exFAT ? "exFAT" : ((x) == UsbHsFsDeviceFileSystemType_NTFS ? "NTFS" : ((x) == UsbHsFsDeviceFileSystemType_EXT2 ? "EXT2" : \
12-
((x) == UsbHsFsDeviceFileSystemType_EXT3 ? "EXT3" : ((x) == UsbHsFsDeviceFileSystemType_EXT4 ? "EXT4" : "Invalid"))))))))
13-
1410
static UEvent *g_statusChangeEvent = NULL, g_exitEvent = {0};
1511

1612
static u32 g_usbDeviceCount = 0;
@@ -345,7 +341,7 @@ int usbMscThreadFunc(void *arg)
345341
device->product_revision, \
346342
device->capacity, \
347343
device->name, \
348-
FS_TYPE(device->fs_type));
344+
LIBUSBHSFS_FS_TYPE_STR(device->fs_type));
349345

350346
consoleUpdate(NULL);
351347

include/usbhsfs.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ extern "C" {
2222
/// Library version.
2323
#define LIBUSBHSFS_VERSION_MAJOR 0
2424
#define LIBUSBHSFS_VERSION_MINOR 2
25-
#define LIBUSBHSFS_VERSION_MICRO 0
25+
#define LIBUSBHSFS_VERSION_MICRO 1
26+
27+
/// Helper macro to generate a string based on a filesystem type value.
28+
#define LIBUSBHSFS_FS_TYPE_STR(x) ((x) == UsbHsFsDeviceFileSystemType_FAT12 ? "FAT12" : ((x) == UsbHsFsDeviceFileSystemType_FAT16 ? "FAT16" : ((x) == UsbHsFsDeviceFileSystemType_FAT32 ? "FAT32" : \
29+
((x) == UsbHsFsDeviceFileSystemType_exFAT ? "exFAT" : ((x) == UsbHsFsDeviceFileSystemType_NTFS ? "NTFS" : ((x) == UsbHsFsDeviceFileSystemType_EXT2 ? "EXT2" : \
30+
((x) == UsbHsFsDeviceFileSystemType_EXT3 ? "EXT3" : ((x) == UsbHsFsDeviceFileSystemType_EXT4 ? "EXT4" : "Invalid"))))))))
2631

2732
/// Used to identify the filesystem type from a mounted filesystem (e.g. filesize limitations, etc.).
2833
typedef enum {

0 commit comments

Comments
 (0)