fix: fix issues

- restore some CKGlobals behavior because it will cause runtime exception.
- move some classes from CmdHelper to UnvirtContext to make CmdHelper more common to use.
- output warning string when fail to get utf8 or ordinary string.
This commit is contained in:
2024-08-27 11:25:53 +08:00
parent 3735a202f3
commit 65861143bf
14 changed files with 91 additions and 70 deletions

View File

@ -204,7 +204,7 @@ namespace Unvirt::StructFormatter {
for (LibCmo::CKDWORD i = 0; i < slot_count; ++i) {
auto desc = bd.GetImageDesc(i);
Console::FormatLine(u8"#%" PRIuCKDWORD "\t%" PRIuCKDWORD "\t%" PRIuCKDWORD "\t0x%" PRIxCKDWORD " bytes\t",
Console::FormatLine(u8"#%" PRIuCKDWORD "\t%" PRIuCKDWORD "\t%" PRIuCKDWORD "\t%s\t0x%" PRIxCKDWORD " bytes\t%s",
i,
desc->GetWidth(),
desc->GetHeight(),