Releases: DarkMatterCore/libusbhsfs
Releases · DarkMatterCore/libusbhsfs
v0.1.0
v0.1.0:
- Built using libnx commit
c51918a
. - Implemented partition table parsing (MBR/GPT/VBR). The library now takes care of looking for boot sectors and/or partition tables on its own, and just passes volume LBAs to filesystem libraries. This makes it possible to mount multiple partitions from the same logical unit as individual devoptab devices.
- Implemented NTFS support. Big thanks to Rhys Koedijk!
- You must link your application against both libusbhsfs and NTFS-3G if you wish to use NTFS support. Please read the How to build section from the README to know how to build NTFS-3G and install it into the
portlibs
directory from devkitPro. - Certain limitations apply. Please read the Limitations section from the README for more information.
- Dual licensing (ISC / GPLv2+) is now provided as a way to allow projects that don't comply with the GPLv2+ license from NTFS-3G to keep using libusbhsfs, albeit with FAT support only. Please read the Licensing section from the readme for more information.
- You must link your application against both libusbhsfs and NTFS-3G if you wish to use NTFS support. Please read the How to build section from the README to know how to build NTFS-3G and install it into the
- Improved safety checks in all internal devoptab functions.
- Library API:
usbHsFsUnmountDevice()
is now provided as a way to manually/safely unmount UMS devices at runtime before disconnecting them.- This has been always been automatically handled by
usbHsFsExit()
if there are any mounted UMS devices when the library interface is closed. So, depending on what you need, you should only callusbHsFsUnmountDevice()
when absolutely necessary.
- This has been always been automatically handled by
usbHsFsGetFileSystemMountFlags()
andusbHsFsSetFileSystemMountFlags()
are now provided as a way to get/set filesystem mount flags.- Please read
include/usbhsfs.h
for more information about these flags and what they do. - These flags only affect NTFS volume mounting at this moment, so they have no effect under ISC licensed builds of the library.
- Furthermore, these functions have no effect at all under SX OS.
- Please read
- BOT driver:
- Inquiry SCSI command is now retried if an unexpected CSW with no sense data is received.
- Both peripheral qualifier and peripheral device type values from Inquiry data are now filtered. Thanks to ginkuji for reporting this issue.
- Logical unit startup now returns right away if an optional SCSI command fails and a
Medium Not Present
additional sense code is reported by the UMS device. - A bus reset is now performed on all UMS devices that are already available when
usbHsFsInitialize()
is called. Fixes logical unit startup for drives that were stopped during a previous session, but not removed from the console. Thanks to FlyingBananaTree for reporting this issue. - Fixed potential memory corruption issues that could have taken place due to not updating LUN/FS context references after reallocating their buffers.
- Debug build:
- Implemented proper caching into debug logging code, making debug builds a lot faster now.
- The logfile is now flushed each time a public API function that generates log messages is called.
- SX OS:
- The status change user-mode event is now signaled on every
usbfs
status change.
- The status change user-mode event is now signaled on every
- Example test application:
- Updated to reflect all these changes.
- Added more filesystem tests.
- Rewrote input handling to match the new
pad
API from libnx. - Now using usbHsFsUnmountDevice() to safely unmount any UMS devices that have already been tested.
v0.0.3
- Added support for a custom event index passed to
usbHsFsInitialize()
, which is internally used withusbHsCreateInterfaceAvailableEvent()
/usbHsDestroyInterfaceAvailableEvent()
. Developers listening for other specific USB interfaces on their own should no longer have issues with the library. - Added fsp-usb check.
usbHsFsInitialize()
will now fail on purpose if fsp-usb is running in the background. - Renamed FatFs library functions to avoid linking errors in homebrew apps that already depend on it.
- Fixed FatFs warnings when building the library with
-O3
. Thanks to ITotalJustice! - Changes to relative path support:
- Modified FatFs to remove all references to
ff_chdrive()
,ff_chdir()
,ff_getcwd()
andFF_FS_RPATH
. We take care of handling the current working directory and only pass absolute paths to FatFs. The code to resolve paths with dot entries wasn't removed. ffdev_chdir()
now just opens the directory from the provided path to make sure it exists, then closes it immediately.- The default devoptab device is now set by the
chdir()
function from devoptab interfaces, usingusbHsFsMountSetDefaultDevoptabDevice()
. This means it's effectively possible to change the current directory and the default devoptab device in one go, just by callingchdir()
with an absolute path (e.g.chdir("ums0:/")
). - It's possible to
chdir()
back to the SD card to change the default devoptab device (e.g.chdir("sdmc:/)
). - If the UMS device that holds the volume set as the default devoptab device is removed from the console, the SD card will be set as the new default devoptab device.
- Removed
usbHsFsSetDefaultDevice()
,usbHsFsGetDefaultDevice()
andusbHsFsUnsetDefaultDevice()
- just usechdir()
now. - Limitations regarding
fsdevMount*()
calls from libnx still apply. Can't do anything about it. - Please read the Relative path support section from the README for more information.
- Modified FatFs to remove all references to
- BOT driver:
- Added support for unexpected CSWs received through an input endpoint during data transfer stages. Thanks to duckbill007 for reporting this issue!
- Always issue a Request Sense command if an unexpected CSW is received.
- Make sure write protection is disabled before issuing any SCP WRITE commands.
- Reduced wait time if a "Not Ready" sense key is received after issuing a Request Sense command.
- Added support for the
usbfs
service from SX OS. Thanks to blawar for providing the updatedusbfs
service calls!- Please read the Limitations section from the README for more information.
- Updated test application to reflect all these changes.
- It is now also capable of performing a test file copy to the UMS filesystem if
test.file
is available at the SD card root directory.
- It is now also capable of performing a test file copy to the UMS filesystem if
v0.0.2
- Relicensed library under the ISC License. We really want you people to adopt it and freely use it in your projects.
- Fixed distribution package version string generation in
Makefile
. LICENSE.md
andREADME.md
are stored in the generated distribution packages.- Added support for relative paths.
- Please read the Relative path support section from the README for more information.
- A trailing colon is now added to the returned mount names from
UsbHsFsDevice
elements. - Fixed devoptab device unregistration.
- Bulk-Only Transport (BOT) driver:
usbHsFsRequestGetMaxLogicalUnits()
now clears the STALL status from both endpoints on its own if it fails.- Likewise,
usbHsFsRequestPostBuffer()
now attempts to clear the STALL status from both endpoints if it fails.
- FatFs devoptab interface:
- Fixed error code translations for some FatFs errors.
- Created an unified
ffdev_fill_stat()
function for bothffdev_stat()
andffdev_dirnext()
. - Fixed POSIX timestamp conversions from DOS timestamps.
- Debug build:
- Debug messages from
usbHsFsScsiReadLogicalUnitBlocks()
andusbHsFsScsiReadLogicalUnitBlocks()
now include the total number of bytes to transfer per each loop iteration. - Added debug messages to the FatFs devoptab interface.
- Debug messages from
v0.0.1
Initial release. Only capable of mounting one FAT filesystem per logical unit from each connected UMS device.