bios_table.cpp (45fed20ff763371738f1e61d4966b8b069918820) | bios_table.cpp (6492f524b7b2dfc9f04ee0ad68c4c2e35bbbcd25) |
---|---|
1#include "bios_table.hpp" 2 | 1#include "bios_table.hpp" 2 |
3#include <fstream> 4 | |
5#include "bios_table.h" 6 | 3#include "bios_table.h" 4 |
5#include <fstream> 6 |
|
7namespace pldm 8{ 9 10namespace responder 11{ 12 13namespace bios 14{ 15 16BIOSTable::BIOSTable(const char* filePath) : filePath(filePath) | 7namespace pldm 8{ 9 10namespace responder 11{ 12 13namespace bios 14{ 15 16BIOSTable::BIOSTable(const char* filePath) : filePath(filePath) |
17{ 18} | 17{} |
19 20bool BIOSTable::isEmpty() const noexcept 21{ 22 bool empty = false; 23 try 24 { 25 empty = fs::is_empty(filePath); 26 } --- 16 unchanged lines hidden (view full) --- 43 auto fileSize = fs::file_size(filePath); 44 response.resize(currSize + fileSize); 45 std::ifstream stream(filePath.string(), std::ios::in | std::ios::binary); 46 stream.read(reinterpret_cast<char*>(response.data() + currSize), fileSize); 47} 48 49BIOSStringTable::BIOSStringTable(const Table& stringTable) : 50 stringTable(stringTable) | 18 19bool BIOSTable::isEmpty() const noexcept 20{ 21 bool empty = false; 22 try 23 { 24 empty = fs::is_empty(filePath); 25 } --- 16 unchanged lines hidden (view full) --- 42 auto fileSize = fs::file_size(filePath); 43 response.resize(currSize + fileSize); 44 std::ifstream stream(filePath.string(), std::ios::in | std::ios::binary); 45 stream.read(reinterpret_cast<char*>(response.data() + currSize), fileSize); 46} 47 48BIOSStringTable::BIOSStringTable(const Table& stringTable) : 49 stringTable(stringTable) |
51{ 52} | 50{} |
53 54BIOSStringTable::BIOSStringTable(const BIOSTable& biosTable) 55{ 56 biosTable.load(stringTable); 57} 58 59std::string BIOSStringTable::findString(uint16_t handle) const 60{ --- 284 unchanged lines hidden --- | 51 52BIOSStringTable::BIOSStringTable(const BIOSTable& biosTable) 53{ 54 biosTable.load(stringTable); 55} 56 57std::string BIOSStringTable::findString(uint16_t handle) const 58{ --- 284 unchanged lines hidden --- |