mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
pcie: use scanff instead of istringstream
Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
This commit is contained in:
parent
6646308d14
commit
4ff1b159dd
1 changed files with 2 additions and 1 deletions
|
@ -378,7 +378,8 @@ uint32_t Device::readHostBar(unsigned barNum) const
|
|||
throw RuntimeError("Failed to read resource file");
|
||||
|
||||
unsigned long long start, end, flags;
|
||||
std::istringstream(line) >> std::hex >> start >> end >> flags;
|
||||
if (std::sscanf(line.c_str(), "%llx %llx %llx", &start, &end, &flags) != 3)
|
||||
throw SystemError("Failed to parse BAR line");
|
||||
|
||||
if (end > start)
|
||||
throw SystemError("Invalid BAR: start={}, end={}", start, end);
|
||||
|
|
Loading…
Add table
Reference in a new issue