mirror of
https://github.com/AxioDL/nod.git
synced 2025-12-11 14:42:00 +00:00
Update fmtlib
This commit is contained in:
@@ -421,7 +421,7 @@ public:
|
||||
|
||||
uint32_t h3;
|
||||
if (rs->read(&h3, 4) != 4) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to read H3 offset apploader")));
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("unable to read H3 offset apploader")));
|
||||
return nullptr;
|
||||
}
|
||||
h3 = SBig(h3);
|
||||
@@ -539,7 +539,7 @@ DiscWii::DiscWii(std::unique_ptr<IDiscIO>&& dio, bool& err) : DiscBase(std::move
|
||||
kind = part.partType;
|
||||
break;
|
||||
default:
|
||||
LogModule.report(logvisor::Error, fmt("invalid partition type {}"), part.partType);
|
||||
LogModule.report(logvisor::Error, FMT_STRING("invalid partition type {}"), part.partType);
|
||||
err = true;
|
||||
return;
|
||||
}
|
||||
@@ -557,7 +557,7 @@ bool DiscWii::extractDiscHeaderFiles(SystemStringView basePath, const Extraction
|
||||
SystemString basePathStr(basePath);
|
||||
|
||||
if (Mkdir((basePathStr + _SYS_STR("/disc")).c_str(), 0755) && errno != EEXIST) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to mkdir '{}/disc'")), basePathStr);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("unable to mkdir '{}/disc'")), basePathStr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -675,7 +675,7 @@ public:
|
||||
}
|
||||
|
||||
if (m_fio->write(m_buf, 0x200000) != 0x200000) {
|
||||
LogModule.report(logvisor::Error, fmt("unable to write full disc group"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("unable to write full disc group"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -684,7 +684,7 @@ public:
|
||||
PartWriteStream(PartitionBuilderWii& parent, uint64_t baseOffset, uint64_t offset, bool& err)
|
||||
: m_parent(parent), m_baseOffset(baseOffset), m_offset(offset) {
|
||||
if (offset % 0x1F0000) {
|
||||
LogModule.report(logvisor::Error, fmt("partition write stream MUST begin on 0x1F0000-aligned boundary"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("partition write stream MUST begin on 0x1F0000-aligned boundary"));
|
||||
err = true;
|
||||
return;
|
||||
}
|
||||
@@ -754,13 +754,13 @@ public:
|
||||
uint64_t userAllocate(uint64_t reqSz, IPartWriteStream& ws) override {
|
||||
reqSz = ROUND_UP_32(reqSz);
|
||||
if (m_curUser + reqSz >= 0x1FB450000) {
|
||||
LogModule.report(logvisor::Error, fmt("partition exceeds maximum single-partition capacity"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("partition exceeds maximum single-partition capacity"));
|
||||
return -1;
|
||||
}
|
||||
uint64_t ret = m_curUser;
|
||||
PartWriteStream& cws = static_cast<PartWriteStream&>(ws);
|
||||
if (cws.m_offset > ret) {
|
||||
LogModule.report(logvisor::Error, fmt("partition overwrite error"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("partition overwrite error"));
|
||||
return -1;
|
||||
}
|
||||
while (cws.m_offset < ret)
|
||||
@@ -838,7 +838,7 @@ public:
|
||||
fstSz = ROUND_UP_32(fstSz);
|
||||
|
||||
if (fstOff + fstSz >= 0x1F0000) {
|
||||
LogModule.report(logvisor::Error, fmt("FST flows into user area (one or the other is too big)"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("FST flows into user area (one or the other is too big)"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -854,7 +854,7 @@ public:
|
||||
|
||||
size_t fstOffRel = fstOff - 0x2440;
|
||||
if (xferSz > fstOffRel) {
|
||||
LogModule.report(logvisor::Error, fmt("apploader unexpectedly flows into FST"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("apploader unexpectedly flows into FST"));
|
||||
return -1;
|
||||
}
|
||||
for (size_t i = 0; i < fstOffRel - xferSz; ++i)
|
||||
@@ -938,7 +938,7 @@ public:
|
||||
SystemString ticketIn = basePath + _SYS_STR("/ticket.bin");
|
||||
Sstat theStat;
|
||||
if (Stat(ticketIn.c_str(), &theStat)) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to stat {}")), ticketIn);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("unable to stat {}")), ticketIn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -946,7 +946,7 @@ public:
|
||||
SystemString tmdIn = basePath + _SYS_STR("/tmd.bin");
|
||||
Sstat tmdStat;
|
||||
if (Stat(tmdIn.c_str(), &tmdStat)) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to stat {}")), tmdIn);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("unable to stat {}")), tmdIn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -954,7 +954,7 @@ public:
|
||||
SystemString certIn = basePath + _SYS_STR("/cert.bin");
|
||||
Sstat certStat;
|
||||
if (Stat(certIn.c_str(), &certStat)) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to stat {}")), certIn);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("unable to stat {}")), certIn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -962,7 +962,7 @@ public:
|
||||
SystemString apploaderIn = basePath + _SYS_STR("/sys/apploader.img");
|
||||
Sstat apploaderStat;
|
||||
if (Stat(apploaderIn.c_str(), &apploaderStat)) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to stat {}")), apploaderIn);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("unable to stat {}")), apploaderIn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -970,7 +970,7 @@ public:
|
||||
SystemString bootIn = basePath + _SYS_STR("/sys/boot.bin");
|
||||
Sstat bootStat;
|
||||
if (Stat(bootIn.c_str(), &bootStat)) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to stat {}")), bootIn);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("unable to stat {}")), bootIn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -978,7 +978,7 @@ public:
|
||||
SystemString bi2In = basePath + _SYS_STR("/sys/bi2.bin");
|
||||
Sstat bi2Stat;
|
||||
if (Stat(bi2In.c_str(), &bi2Stat)) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to stat {}")), bi2In);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("unable to stat {}")), bi2In);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1071,7 +1071,7 @@ public:
|
||||
cws.write(buf, rdSz);
|
||||
xferSz += rdSz;
|
||||
if (0x2440 + xferSz >= 0x1F0000) {
|
||||
LogModule.report(logvisor::Error, fmt("apploader flows into user area (one or the other is too big)"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("apploader flows into user area (one or the other is too big)"));
|
||||
return false;
|
||||
}
|
||||
m_parent.m_progressCB(m_parent.getProgressFactor(), apploaderIn, xferSz);
|
||||
@@ -1129,7 +1129,7 @@ public:
|
||||
cws.write(apploaderBuf.get(), apploaderSz);
|
||||
xferSz += apploaderSz;
|
||||
if (0x2440 + xferSz >= 0x1F0000) {
|
||||
LogModule.report(logvisor::Error, fmt("apploader flows into user area (one or the other is too big)"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("apploader flows into user area (one or the other is too big)"));
|
||||
return false;
|
||||
}
|
||||
m_parent.m_progressCB(m_parent.getProgressFactor(), apploaderName, xferSz);
|
||||
@@ -1153,7 +1153,7 @@ EBuildResult DiscBuilderWii::buildFromDirectory(SystemStringView dirIn) {
|
||||
return EBuildResult::Failed;
|
||||
|
||||
if (!CheckFreeSpace(m_outPath.c_str(), m_discCapacity)) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("not enough free disk space for {}")), m_outPath);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("not enough free disk space for {}")), m_outPath);
|
||||
return EBuildResult::DiskFull;
|
||||
}
|
||||
m_progressCB(getProgressFactor(), _SYS_STR("Preallocating image"), -1);
|
||||
@@ -1172,7 +1172,7 @@ EBuildResult DiscBuilderWii::buildFromDirectory(SystemStringView dirIn) {
|
||||
if (filledSz == UINT64_MAX)
|
||||
return EBuildResult::Failed;
|
||||
else if (filledSz >= uint64_t(m_discCapacity)) {
|
||||
LogModule.report(logvisor::Error, fmt("data partition exceeds disc capacity"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("data partition exceeds disc capacity"));
|
||||
return EBuildResult::Failed;
|
||||
}
|
||||
|
||||
@@ -1246,7 +1246,7 @@ std::optional<uint64_t> DiscBuilderWii::CalculateTotalSizeRequired(SystemStringV
|
||||
*sz += 0x200000;
|
||||
dualLayer = (sz > 0x118240000);
|
||||
if (sz > 0x1FB4E0000) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("disc capacity exceeded [{} / {}]")), *sz, 0x1FB4E0000);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("disc capacity exceeded [{} / {}]")), *sz, 0x1FB4E0000);
|
||||
return std::nullopt;
|
||||
}
|
||||
return sz;
|
||||
@@ -1267,7 +1267,7 @@ EBuildResult DiscMergerWii::mergeFromDirectory(SystemStringView dirIn) {
|
||||
return EBuildResult::Failed;
|
||||
|
||||
if (!CheckFreeSpace(m_builder.m_outPath.c_str(), m_builder.m_discCapacity)) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("not enough free disk space for {}")), m_builder.m_outPath);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("not enough free disk space for {}")), m_builder.m_outPath);
|
||||
return EBuildResult::DiskFull;
|
||||
}
|
||||
m_builder.m_progressCB(m_builder.getProgressFactor(), _SYS_STR("Preallocating image"), -1);
|
||||
@@ -1286,7 +1286,7 @@ EBuildResult DiscMergerWii::mergeFromDirectory(SystemStringView dirIn) {
|
||||
if (filledSz == UINT64_MAX)
|
||||
return EBuildResult::Failed;
|
||||
else if (filledSz >= uint64_t(m_builder.m_discCapacity)) {
|
||||
LogModule.report(logvisor::Error, fmt("data partition exceeds disc capacity"));
|
||||
LogModule.report(logvisor::Error, FMT_STRING("data partition exceeds disc capacity"));
|
||||
return EBuildResult::Failed;
|
||||
}
|
||||
|
||||
@@ -1353,7 +1353,7 @@ std::optional<uint64_t> DiscMergerWii::CalculateTotalSizeRequired(DiscWii& sourc
|
||||
*sz += 0x200000;
|
||||
dualLayer = (sz > 0x118240000);
|
||||
if (sz > 0x1FB4E0000) {
|
||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("disc capacity exceeded [{} / {}]")), *sz, 0x1FB4E0000);
|
||||
LogModule.report(logvisor::Error, FMT_STRING(_SYS_STR("disc capacity exceeded [{} / {}]")), *sz, 0x1FB4E0000);
|
||||
return std::nullopt;
|
||||
}
|
||||
return sz;
|
||||
|
||||
Reference in New Issue
Block a user