Andrew Jeffery | a11a3b0 | 2018-02-26 10:13:37 +1030 | [diff] [blame] | 1 | // SPDX-License-Identifier: Apache-2.0 |
| 2 | // Copyright (C) 2018 IBM Corp. |
| 3 | |
| 4 | #include "config.h" |
Andrew Jeffery | a11a3b0 | 2018-02-26 10:13:37 +1030 | [diff] [blame] | 5 | |
Andrew Jeffery | de08ca2 | 2019-03-18 13:23:46 +1030 | [diff] [blame^] | 6 | #include "vpnor/table.hpp" |
Andrew Jeffery | a11a3b0 | 2018-02-26 10:13:37 +1030 | [diff] [blame] | 7 | |
Andrew Jeffery | 261f61a | 2019-03-14 09:57:28 +1030 | [diff] [blame] | 8 | #include <cassert> |
William A. Kennington III | d5f1d40 | 2018-10-11 13:55:04 -0700 | [diff] [blame] | 9 | |
Andrew Jeffery | a11a3b0 | 2018-02-26 10:13:37 +1030 | [diff] [blame] | 10 | static constexpr auto BLOCK_SIZE = 4 * 1024; |
| 11 | |
| 12 | int main() |
| 13 | { |
| 14 | namespace vpnor = openpower::virtual_pnor; |
| 15 | |
| 16 | struct pnor_partition part; |
| 17 | std::string line; |
| 18 | |
| 19 | line = "partition01=FOO,00001000,00002000,,ECC,PRESERVED"; |
| 20 | try |
| 21 | { |
| 22 | openpower::virtual_pnor::parseTocLine(line, BLOCK_SIZE, part); |
| 23 | } |
| 24 | catch (vpnor::MalformedTocEntry& e) |
| 25 | { |
| 26 | return 0; |
| 27 | } |
| 28 | |
| 29 | assert(false); |
| 30 | } |