Andrew Jeffery | b02ef43 | 2018-02-26 09:57:17 +1030 | [diff] [blame] | 1 | // SPDX-License-Identifier: Apache-2.0 |
| 2 | // Copyright (C) 2018 IBM Corp. |
| 3 | |
| 4 | #include "config.h" |
| 5 | #include <assert.h> |
| 6 | |
Andrew Jeffery | 53c21aa | 2018-03-26 11:56:16 +1030 | [diff] [blame] | 7 | #include "vpnor/pnor_partition_table.hpp" |
Andrew Jeffery | b02ef43 | 2018-02-26 09:57:17 +1030 | [diff] [blame] | 8 | |
| 9 | static constexpr auto BLOCK_SIZE = 4 * 1024; |
| 10 | |
| 11 | int main() |
| 12 | { |
| 13 | namespace vpnor = openpower::virtual_pnor; |
| 14 | |
| 15 | const std::string line = "partition01=,00000000,00000400,80,ECC,PRESERVED"; |
| 16 | struct pnor_partition part; |
| 17 | |
| 18 | try |
| 19 | { |
| 20 | vpnor::parseTocLine(line, BLOCK_SIZE, part); |
| 21 | } |
| 22 | catch (vpnor::MalformedTocEntry& e) |
| 23 | { |
| 24 | return 0; |
| 25 | } |
| 26 | |
| 27 | assert(false); |
| 28 | } |