diff options
Diffstat (limited to 'utility/load_kernel_test.c')
-rw-r--r-- | utility/load_kernel_test.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/utility/load_kernel_test.c b/utility/load_kernel_test.c index 405fced6..565161eb 100644 --- a/utility/load_kernel_test.c +++ b/utility/load_kernel_test.c @@ -15,7 +15,6 @@ #include "2misc.h" #include "2sysincludes.h" #include "host_common.h" -#include "load_kernel_fw.h" #define LBA_BYTES 512 #define KERNEL_BUFFER_SIZE 0xA00000 @@ -25,13 +24,13 @@ static struct vb2_context *ctx; static struct vb2_shared_data *sd; /* Global variables for stub functions */ -static VbSelectAndLoadKernelParams lkp; -static VbDiskInfo disk_info; +static struct vb2_kernel_params lkp; +static struct vb2_disk_info disk_info; static FILE *image_file = NULL; /* Boot device stub implementations to read from the image file */ -vb2_error_t VbExDiskRead(VbExDiskHandle_t handle, uint64_t lba_start, +vb2_error_t VbExDiskRead(vb2ex_disk_handle_t handle, uint64_t lba_start, uint64_t lba_count, void *buffer) { printf("Read(%" PRIu64 ", %" PRIu64 ")\n", lba_start, lba_count); @@ -56,7 +55,7 @@ vb2_error_t VbExDiskRead(VbExDiskHandle_t handle, uint64_t lba_start, } -vb2_error_t VbExDiskWrite(VbExDiskHandle_t handle, uint64_t lba_start, +vb2_error_t VbExDiskWrite(vb2ex_disk_handle_t handle, uint64_t lba_start, uint64_t lba_count, const void *buffer) { printf("Write(%" PRIu64 ", %" PRIu64 ")\n", lba_start, lba_count); @@ -99,7 +98,7 @@ int main(int argc, char* argv[]) int errorcnt = 0; char *e = 0; - memset(&lkp, 0, sizeof(VbSelectAndLoadKernelParams)); + memset(&lkp, 0, sizeof(lkp)); disk_info.bytes_per_lba = LBA_BYTES; int boot_flags = BOOT_FLAG_RECOVERY; @@ -243,9 +242,9 @@ int main(int argc, char* argv[]) if (boot_flags & BOOT_FLAG_DEVELOPER) ctx->flags |= VB2_CONTEXT_DEVELOPER_MODE; - /* Call LoadKernel() */ - rv = LoadKernel(ctx, &lkp, &disk_info); - printf("LoadKernel() returned %d\n", rv); + /* Call vb2api_load_kernel() */ + rv = vb2api_load_kernel(ctx, &lkp, &disk_info); + printf("vb2api_load_kernel() returned %d\n", rv); if (VB2_SUCCESS == rv) { printf("Partition number: %u\n", lkp.partition_number); |