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" |
Andrew Jeffery | b02ef43 | 2018-02-26 09:57:17 +1030 | [diff] [blame] | 5 | |
Andrew Jeffery | 53c21aa | 2018-03-26 11:56:16 +1030 | [diff] [blame] | 6 | #include "vpnor/pnor_partition_table.hpp" |
Andrew Jeffery | b02ef43 | 2018-02-26 09:57:17 +1030 | [diff] [blame] | 7 | |
William A. Kennington III | d5f1d40 | 2018-10-11 13:55:04 -0700 | [diff] [blame^] | 8 | #include <assert.h> |
| 9 | |
Andrew Jeffery | b02ef43 | 2018-02-26 09:57:17 +1030 | [diff] [blame] | 10 | static constexpr auto BLOCK_SIZE = 4 * 1024; |
| 11 | |
| 12 | int main() |
| 13 | { |
| 14 | namespace vpnor = openpower::virtual_pnor; |
| 15 | |
| 16 | const std::string line = "partition01=,00000000,00000400,80,ECC,PRESERVED"; |
| 17 | struct pnor_partition part; |
| 18 | |
| 19 | try |
| 20 | { |
| 21 | vpnor::parseTocLine(line, BLOCK_SIZE, part); |
| 22 | } |
| 23 | catch (vpnor::MalformedTocEntry& e) |
| 24 | { |
| 25 | return 0; |
| 26 | } |
| 27 | |
| 28 | assert(false); |
| 29 | } |