mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
- remove stdio debugging (not efficient and unused)
- call mkfifo for randomly created named pipes (linux only) - sysreg hangs in 2nd stage due to the -vnc 0 option svn path=/trunk/; revision=29460
This commit is contained in:
parent
d576ff0223
commit
596003e53b
1 changed files with 31 additions and 35 deletions
|
@ -27,7 +27,9 @@
|
|||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <signal.h>
|
||||
#ifndef __LINUX__
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
namespace Sysreg_
|
||||
{
|
||||
|
@ -291,6 +293,7 @@ namespace Sysreg_
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
pipe = "pipe:/tmp/qemu";
|
||||
m_Src = "/tmp/qemu";
|
||||
}
|
||||
|
@ -369,18 +372,15 @@ namespace Sysreg_
|
|||
//----------------------------------------------------------------------------------------
|
||||
bool RosBootTest::extractPipeFromBootCmd()
|
||||
{
|
||||
string::size_type pos = m_BootCmd.find("-serial");
|
||||
string::size_type pos = m_BootCmd.find("-serial pipe:");
|
||||
if (pos == string::npos)
|
||||
{
|
||||
/* no debug options provided */
|
||||
cerr << "Error: provided boot cmd does not specify a pipe debugging port" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
string pipe = m_BootCmd.substr(pos + 7, m_BootCmd.size() - pos -7);
|
||||
pos = pipe.find("pipe:");
|
||||
if (pos == 0)
|
||||
{
|
||||
pipe = pipe.substr(pos + 5, pipe.size() - pos - 5);
|
||||
string pipe = m_BootCmd.substr(pos + 13, m_BootCmd.size() - pos - 13);
|
||||
pos = pipe.find(" ");
|
||||
if (pos != string::npos)
|
||||
{
|
||||
|
@ -394,22 +394,6 @@ namespace Sysreg_
|
|||
m_DebugPort = "pipe";
|
||||
return true;
|
||||
}
|
||||
pos = pipe.find("stdio");
|
||||
if (pos == 0)
|
||||
{
|
||||
#ifdef __LINUX__
|
||||
m_Src = m_BootCmd;
|
||||
m_DebugPort = "stdio";
|
||||
return true;
|
||||
#else
|
||||
cerr << "Error: reading from stdio is not supported for windows hosts - use pipes" << endl;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
cerr << "Error: no valid debug port specified - use stdio / pipes" << endl;
|
||||
return false;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------
|
||||
bool RosBootTest::configureHDDImage()
|
||||
{
|
||||
|
@ -610,12 +594,24 @@ namespace Sysreg_
|
|||
return false;
|
||||
}
|
||||
}
|
||||
#ifdef __LINUX__
|
||||
if (mkfifo(m_Src.c_str(), 400))
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
cerr <<"Error: mkfifo failed with " << errno << endl;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
if (m_PidFile.length () && isFileExisting(m_PidFile))
|
||||
{
|
||||
cerr << "Deleting pid file " << m_PidFile << endl;
|
||||
remove(m_PidFile.c_str ());
|
||||
}
|
||||
|
||||
|
||||
|
||||
cerr << "Opening Data Source:" << m_BootCmd << endl;
|
||||
m_DataSource = new NamedPipeReader();
|
||||
if (!executeBootCmd())
|
||||
|
|
Loading…
Reference in a new issue