mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-23 06:58:03 +00:00
clang
This commit is contained in:
parent
60a32ab723
commit
8d952a0123
1
externals/ext-wepoll
vendored
Submodule
1
externals/ext-wepoll
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d3bb81035304a0dc6a5ca48ebf0f8cee1fe269e4
|
||||
@ -38,7 +38,8 @@ template <int stub_index>
|
||||
static u64 CommonStub() {
|
||||
auto entry = stub_nids[stub_index];
|
||||
// if (entry) {
|
||||
// LOG_ERROR(Core, "Stub: {} (nid: {}) called, returning zero to {}", entry->name, entry->nid,
|
||||
// LOG_ERROR(Core, "Stub: {} (nid: {}) called, returning zero to {}", entry->name,
|
||||
// entry->nid,
|
||||
// __builtin_return_address(0));
|
||||
// } else {
|
||||
// LOG_ERROR(Core, "Stub: Unknown (nid: {}) called, returning zero to {}",
|
||||
|
||||
@ -418,7 +418,8 @@ void QFS::SyncHostImpl(partition_ptr part) {
|
||||
}
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
LOG_CRITICAL(Kernel_Fs, "An error occurred when syncing [{}]: {}", host_path.string(), e.what());
|
||||
LOG_CRITICAL(Kernel_Fs, "An error occurred when syncing [{}]: {}", host_path.string(),
|
||||
e.what());
|
||||
}
|
||||
|
||||
return; // true
|
||||
|
||||
@ -46,7 +46,7 @@ int Partition::GetHostPath(fs::path& output_path, const fs::path& local_path) {
|
||||
|
||||
fs::path host_path_target_sanitized = SanitizePath(host_path_target);
|
||||
if (host_path_target_sanitized.empty()) {
|
||||
LOG_ERROR(Kernel_Fs,"Malicious path detected: {}", host_path_target.string());
|
||||
LOG_ERROR(Kernel_Fs, "Malicious path detected: {}", host_path_target.string());
|
||||
return -QUASI_EACCES;
|
||||
}
|
||||
output_path = host_path_target_sanitized;
|
||||
|
||||
@ -90,7 +90,8 @@ int QFS::OperationImpl::Open(const fs::path& path, int flags, u16 mode) {
|
||||
|
||||
if (int tmp_hio_status = hio_status >= 0 ? 0 : hio_status;
|
||||
host_used && (tmp_hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
if (vio_status < 0)
|
||||
return vio_status;
|
||||
@ -183,7 +184,8 @@ int QFS::OperationImpl::LinkSymbolic(const fs::path& src, const fs::path& dst) {
|
||||
return hio_status;
|
||||
host_used = true;
|
||||
} else if (dst_part->IsHostMounted() ^ src_part->IsHostMounted()) {
|
||||
LOG_ERROR(Kernel_Fs,"Symlinks can be only created if both source and destination are host-bound");
|
||||
LOG_ERROR(Kernel_Fs,
|
||||
"Symlinks can be only created if both source and destination are host-bound");
|
||||
return -QUASI_ENOSYS;
|
||||
}
|
||||
|
||||
@ -193,7 +195,8 @@ int QFS::OperationImpl::LinkSymbolic(const fs::path& src, const fs::path& dst) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -239,7 +242,8 @@ int QFS::OperationImpl::Link(const fs::path& src, const fs::path& dst) {
|
||||
return hio_status;
|
||||
host_used = true;
|
||||
} else if (dst_part->IsHostMounted() ^ src_part->IsHostMounted()) {
|
||||
LOG_ERROR(Kernel_Fs,"Links can be only created if both source and destination are host-bound");
|
||||
LOG_ERROR(Kernel_Fs,
|
||||
"Links can be only created if both source and destination are host-bound");
|
||||
return -QUASI_ENOSYS;
|
||||
}
|
||||
|
||||
@ -248,7 +252,8 @@ int QFS::OperationImpl::Link(const fs::path& src, const fs::path& dst) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -307,7 +312,8 @@ int QFS::OperationImpl::Unlink(const fs::path& path) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -337,7 +343,8 @@ int QFS::OperationImpl::Flush(const s32 fd) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -367,7 +374,8 @@ int QFS::OperationImpl::FSync(const s32 fd) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
};
|
||||
@ -403,7 +411,8 @@ int QFS::OperationImpl::Truncate(const fs::path& path, u64 length) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -435,7 +444,8 @@ int QFS::OperationImpl::FTruncate(const s32 fd, u64 length) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -462,7 +472,8 @@ u64 QFS::OperationImpl::LSeek(const s32 fd, u64 offset, SeekOrigin origin) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
};
|
||||
@ -506,7 +517,8 @@ s64 QFS::OperationImpl::Write(const s32 fd, const void* buf, u64 count) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -536,7 +548,8 @@ s64 QFS::OperationImpl::PWrite(const s32 fd, const void* buf, u64 count, u64 off
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
};
|
||||
@ -566,7 +579,8 @@ s64 QFS::OperationImpl::Read(const s32 fd, void* buf, u64 count) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -596,7 +610,8 @@ s64 QFS::OperationImpl::PRead(const s32 fd, void* buf, u64 count, u64 offset) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
};
|
||||
@ -640,7 +655,8 @@ int QFS::OperationImpl::MKDir(const fs::path& path, u16 mode) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -674,7 +690,8 @@ int QFS::OperationImpl::RMDir(const fs::path& path) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -773,7 +790,8 @@ int QFS::OperationImpl::FStat(const s32 fd, Libraries::Kernel::OrbisKernelStat*
|
||||
memcpy(statbuf, &vio_stat, sizeof(Libraries::Kernel::OrbisKernelStat));
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -810,7 +828,8 @@ int QFS::OperationImpl::Chmod(const fs::path& path, u16 mode) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
@ -840,7 +859,8 @@ int QFS::OperationImpl::FChmod(const s32 fd, u16 mode) {
|
||||
qfs.vio_driver.ClearCtx();
|
||||
|
||||
if (host_used && (hio_status != vio_status))
|
||||
LOG_ERROR(Kernel_Fs,"Host returned {}, but virtual driver returned {}", hio_status, vio_status);
|
||||
LOG_ERROR(Kernel_Fs, "Host returned {}, but virtual driver returned {}", hio_status,
|
||||
vio_status);
|
||||
|
||||
return vio_status;
|
||||
}
|
||||
|
||||
@ -97,7 +97,8 @@ public:
|
||||
// audio queue stalling, which may happen during device changes, for example.
|
||||
// Otherwise, latency may grow over time unbounded.
|
||||
if (const auto queued = SDL_GetAudioStreamQueued(stream); queued >= queue_threshold) {
|
||||
// LOG_INFO(Lib_AudioOut, "SDL audio queue backed up ({} queued, {} threshold), clearing.",
|
||||
// LOG_INFO(Lib_AudioOut, "SDL audio queue backed up ({} queued, {} threshold),
|
||||
// clearing.",
|
||||
// queued, queue_threshold);
|
||||
SDL_ClearAudioStream(stream);
|
||||
// Recalculate the threshold in case this happened because of a device change.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user