mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
Common: Migrate logging to fmt
Continues the migration of our code over to the fmt logger.
This commit is contained in:
@ -60,7 +60,7 @@ static int AshmemCreateFileMapping(const char* name, size_t size)
|
||||
if (ret < 0)
|
||||
{
|
||||
close(fd);
|
||||
NOTICE_LOG(MEMMAP, "Ashmem returned error: 0x%08x", ret);
|
||||
NOTICE_LOG_FMT(MEMMAP, "Ashmem returned error: {:#010x}", ret);
|
||||
return ret;
|
||||
}
|
||||
return fd;
|
||||
@ -77,7 +77,7 @@ void MemArena::GrabSHMSegment(size_t size)
|
||||
fd = AshmemCreateFileMapping(("dolphin-emu." + std::to_string(getpid())).c_str(), size);
|
||||
if (fd < 0)
|
||||
{
|
||||
NOTICE_LOG(MEMMAP, "Ashmem allocation failed");
|
||||
NOTICE_LOG_FMT(MEMMAP, "Ashmem allocation failed");
|
||||
return;
|
||||
}
|
||||
#else
|
||||
@ -85,12 +85,12 @@ void MemArena::GrabSHMSegment(size_t size)
|
||||
fd = shm_open(file_name.c_str(), O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
if (fd == -1)
|
||||
{
|
||||
ERROR_LOG(MEMMAP, "shm_open failed: %s", strerror(errno));
|
||||
ERROR_LOG_FMT(MEMMAP, "shm_open failed: {}", strerror(errno));
|
||||
return;
|
||||
}
|
||||
shm_unlink(file_name.c_str());
|
||||
if (ftruncate(fd, size) < 0)
|
||||
ERROR_LOG(MEMMAP, "Failed to allocate low memory space");
|
||||
ERROR_LOG_FMT(MEMMAP, "Failed to allocate low memory space");
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ void* MemArena::CreateView(s64 offset, size_t size, void* base)
|
||||
|
||||
if (retval == MAP_FAILED)
|
||||
{
|
||||
NOTICE_LOG(MEMMAP, "mmap failed");
|
||||
NOTICE_LOG_FMT(MEMMAP, "mmap failed");
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user