diff options
Diffstat (limited to 'test/vpnor/create_read_window_vpnor.cpp')
-rw-r--r-- | test/vpnor/create_read_window_vpnor.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/test/vpnor/create_read_window_vpnor.cpp b/test/vpnor/create_read_window_vpnor.cpp index 5adb044..87deb9c 100644 --- a/test/vpnor/create_read_window_vpnor.cpp +++ b/test/vpnor/create_read_window_vpnor.cpp @@ -65,24 +65,17 @@ namespace test = openpower::virtual_pnor::test; int main() { - fs::path path; - const char *cpath; - - test::VpnorRoot root(toc, BLOCK_SIZE); - root.write("HBB", data, sizeof(data)); - - path = root.ro(); - cpath = path.c_str(); + struct mbox_context *ctx; system_set_reserved_size(MEM_SIZE); system_set_mtd_sizes(MEM_SIZE, ERASE_SIZE); - struct mbox_context *ctx = mbox_create_test_context(N_WINDOWS, WINDOW_SIZE); - strcpy(ctx->paths.ro_loc, cpath); - strcpy(ctx->paths.rw_loc, cpath); - strcpy(ctx->paths.prsv_loc, cpath); + ctx = mbox_create_test_context(N_WINDOWS, WINDOW_SIZE); + + test::VpnorRoot root(ctx, toc, BLOCK_SIZE); + root.write("HBB", data, sizeof(data)); - vpnor_create_partition_table_from_path(ctx, cpath); + vpnor_create_partition_table_from_path(ctx, root.ro().c_str()); int rc = mbox_command_dispatch(ctx, get_info, sizeof(get_info)); assert(rc == 1); |