Libusbhsfs v0.1.0 with NTFS support Released

Libusbhsfs v0.1.0 with NTFS support

The Libusbhsfs Library has just been updated to introduce support for NTFS files, so applications that will use this new library can be stored on external hard disks like in SX OS.
For the host part, the USB device is similar to an external hard drive, in fact Homebrews that work in Atmosphere, Goldleaf, Awoo Installer, among others, can use hard drives directly as is done from SX OS with even NTFS support now that they support it. Yes, support for external hard drives is finally a reality in NTFS! Unfortunately this only concerns homebrews not Atmosphere, do not expect to install NSP games on a hard drive.

Changelog 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.

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 call usbHsFsUnmountDevice() when absolutely necessary.
    usbHsFsGetFileSystemMountFlags() and usbHsFsSetFileSystemMountFlags() 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.

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.

    The status change user-mode event is now signaled on every usbfs status change.
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.

Download: libusbhsfs v0.1.0

Post a Comment