Misc: Backports from PCSX2 UI
This commit is contained in:
@ -1922,14 +1922,22 @@ FileSystem::POSIXLock::POSIXLock(int fd)
|
||||
}
|
||||
else
|
||||
{
|
||||
Log_ErrorPrintf("lockf() failed: %d", fd);
|
||||
Log_ErrorPrintf("lockf() failed: %d", errno);
|
||||
m_fd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
FileSystem::POSIXLock::POSIXLock(std::FILE* fp)
|
||||
{
|
||||
POSIXLock(fileno(fp));
|
||||
m_fd = fileno(fp);
|
||||
if (m_fd >= 0)
|
||||
{
|
||||
if (lockf(m_fd, F_LOCK, 0) != 0)
|
||||
{
|
||||
Log_ErrorPrintf("lockf() failed: %d", errno);
|
||||
m_fd = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileSystem::POSIXLock::~POSIXLock()
|
||||
|
||||
Reference in New Issue
Block a user