diff --git a/troposphere/haze/include/haze/file_system_proxy.hpp b/troposphere/haze/include/haze/file_system_proxy.hpp index 24650d175..6f01d64d6 100644 --- a/troposphere/haze/include/haze/file_system_proxy.hpp +++ b/troposphere/haze/include/haze/file_system_proxy.hpp @@ -75,11 +75,11 @@ namespace haze { R_RETURN(this->ForwardResult(fsFsOpenFile, m_filesystem, path, mode, out_file)); } - Result GetSizeFile(FsFile *file, s64 *out_size) { + Result GetFileSize(FsFile *file, s64 *out_size) { R_RETURN(this->ForwardResult(fsFileGetSize, file, out_size)); } - Result SetSizeFile(FsFile *file, s64 size) { + Result SetFileSize(FsFile *file, s64 size) { R_RETURN(this->ForwardResult(fsFileSetSize, file, size)); } @@ -111,7 +111,7 @@ namespace haze { R_RETURN(this->ForwardResult(fsDirRead, d, out_total_entries, max_entries, buf)); } - Result GetEntryCountDirectory(FsDir *d, s64 *out_count) { + Result GetDirectoryEntryCount(FsDir *d, s64 *out_count) { R_RETURN(this->ForwardResult(fsDirGetEntryCount, d, out_count)); } diff --git a/troposphere/haze/include/haze/ptp_object_heap.hpp b/troposphere/haze/include/haze/ptp_object_heap.hpp index e6e6c8ee7..54f307094 100644 --- a/troposphere/haze/include/haze/ptp_object_heap.hpp +++ b/troposphere/haze/include/haze/ptp_object_heap.hpp @@ -116,6 +116,7 @@ namespace haze { m_next_address = this->GetNextAddress() - n; } + /* Otherwise, do nothing. */ /* ... */ } diff --git a/troposphere/haze/source/async_usb_server.cpp b/troposphere/haze/source/async_usb_server.cpp index 3c45411fb..2bffdc7b3 100644 --- a/troposphere/haze/source/async_usb_server.cpp +++ b/troposphere/haze/source/async_usb_server.cpp @@ -19,7 +19,7 @@ namespace haze { namespace { - static constinit UsbSession s_usb_session; + constinit UsbSession g_usb_session; } @@ -27,14 +27,14 @@ namespace haze { m_reactor = reactor; /* Set up a new USB session. */ - R_TRY(s_usb_session.Initialize(interface_info, id_vendor, id_product)); - R_TRY(s_usb_session.SetZeroLengthTermination(false)); + R_TRY(g_usb_session.Initialize(interface_info, id_vendor, id_product)); + R_TRY(g_usb_session.SetZeroLengthTermination(false)); R_SUCCEED(); } void AsyncUsbServer::Finalize() { - s_usb_session.Finalize(); + g_usb_session.Finalize(); } Result AsyncUsbServer::TransferPacketImpl(bool read, void *page, u32 size, u32 *out_size_transferred) const { @@ -42,7 +42,7 @@ namespace haze { s32 waiter_idx; /* If we're not configured yet, wait to become configured first. */ - if (!s_usb_session.GetConfigured()) { + if (!g_usb_session.GetConfigured()) { R_TRY(m_reactor->WaitFor(std::addressof(waiter_idx), waiterForEvent(usbDsGetStateChangeEvent()))); R_TRY(eventClear(usbDsGetStateChangeEvent())); @@ -51,13 +51,13 @@ namespace haze { /* Select the appropriate endpoint and begin a transfer. */ UsbSessionEndpoint ep = read ? UsbSessionEndpoint_Read : UsbSessionEndpoint_Write; - R_TRY(s_usb_session.TransferAsync(ep, page, size, std::addressof(urb_id))); + R_TRY(g_usb_session.TransferAsync(ep, page, size, std::addressof(urb_id))); /* Try to wait for the event. */ - R_TRY(m_reactor->WaitFor(std::addressof(waiter_idx), waiterForEvent(s_usb_session.GetCompletionEvent(ep)))); + R_TRY(m_reactor->WaitFor(std::addressof(waiter_idx), waiterForEvent(g_usb_session.GetCompletionEvent(ep)))); /* Return what we transferred. */ - R_RETURN(s_usb_session.GetTransferResult(ep, urb_id, out_size_transferred)); + R_RETURN(g_usb_session.GetTransferResult(ep, urb_id, out_size_transferred)); } } diff --git a/troposphere/haze/source/ptp_responder.cpp b/troposphere/haze/source/ptp_responder.cpp index 95eed8036..198759e18 100644 --- a/troposphere/haze/source/ptp_responder.cpp +++ b/troposphere/haze/source/ptp_responder.cpp @@ -385,7 +385,7 @@ namespace haze { /* Count how many entries are in the directory. */ s64 entry_count = 0; - R_TRY(m_fs.GetEntryCountDirectory(std::addressof(dir), std::addressof(entry_count))); + R_TRY(m_fs.GetDirectoryEntryCount(std::addressof(dir), std::addressof(entry_count))); /* Begin writing. */ R_TRY(db.AddDataHeader(m_request_header, sizeof(u32) + (entry_count * sizeof(u32)))); @@ -451,7 +451,7 @@ namespace haze { /* Ensure we maintain a clean state on exit. */ ON_SCOPE_EXIT { m_fs.CloseFile(std::addressof(file)); }; - R_TRY(m_fs.GetSizeFile(std::addressof(file), std::addressof(size))); + R_TRY(m_fs.GetFileSize(std::addressof(file), std::addressof(size))); } object_info.filename = std::strrchr(fileobj->GetName(), '/') + 1; @@ -515,7 +515,7 @@ namespace haze { /* Get the file's size. */ s64 size = 0; - R_TRY(m_fs.GetSizeFile(std::addressof(file), std::addressof(size))); + R_TRY(m_fs.GetFileSize(std::addressof(file), std::addressof(size))); /* Send the header and file size. */ R_TRY(db.AddDataHeader(m_request_header, size)); @@ -645,7 +645,7 @@ namespace haze { /* Truncate the file after locking for write. */ s64 offset = 0; - R_TRY(m_fs.SetSizeFile(std::addressof(file), 0)); + R_TRY(m_fs.SetFileSize(std::addressof(file), 0)); /* Begin writing. */ while (true) {