]> xenbits.xensource.com Git - unikraft/libs/click.git/commitdiff
click.cc: Update initrd structure members
authorStefan Jumarea <stefanjumarea02@gmail.com>
Fri, 8 Sep 2023 12:30:16 +0000 (15:30 +0300)
committerUnikraft <monkey@unikraft.io>
Sat, 9 Sep 2023 12:15:03 +0000 (12:15 +0000)
Update initrd structures to match the updates to the Unikraft core.
Use `pbase` instead of `base`, and pass a `struct ukplat_memregion desc **`
to the `find_initrd` function.

Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #7

click.cc

index e84d205edcc914739f8a5aa4c314985e2d7b61bf..c2b7478ea2802fdf12e88093706702338671a69b 100644 (file)
--- a/click.cc
+++ b/click.cc
@@ -152,7 +152,7 @@ static String *
 get_config()
 {
        String *cfg = new String(macaddr_preamble);
-       struct ukplat_memregion_desc img;
+       struct ukplat_memregion_desc *img;
        char *cstr;
        size_t cstr_len;
 
@@ -160,8 +160,8 @@ get_config()
 
        /* First, try initrd */
        if (ukplat_memregion_find_initrd0(&img) >= 0) {
-               cstr = (char *)img.base;
-               cstr_len = img.len;
+               cstr = (char *)img->pbase;
+               cstr_len = img->len;
        } else {
                /* If we can't find a config: use a fallback one statically
                 * compiled in.