X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-boot-editor.c;h=5b098a4bc6f87eb2c987c1aa691a29989424640b;hp=7fa1a42f0eddfbc07794b9f003c4dbfd330dfac6;hb=e1e2ca68;hpb=86c9d34380b0074dab1ba89a569a94280d6999c4 diff --git a/ui/ncurses/nc-boot-editor.c b/ui/ncurses/nc-boot-editor.c index 7fa1a42..5b098a4 100644 --- a/ui/ncurses/nc-boot-editor.c +++ b/ui/ncurses/nc-boot-editor.c @@ -162,7 +162,8 @@ static char *conditional_prefix(struct pb_boot_data *ctx, sep = ""; if (!prefix) prefix = ""; - else if (prefix[strlen(prefix)] != '/') + else if ((prefix[strlen(prefix) - 1] != '/') && + (value[0] != '/')) sep = "/"; return talloc_asprintf(ctx, "%s%s%s", prefix, sep, value); @@ -309,7 +310,7 @@ static int layout_pair(struct boot_editor *boot_editor, int y, static int pad_height(int blockdevs_height) { - return 10 + blockdevs_height; + return 10 + (2 * blockdevs_height); } static void boot_editor_layout_widgets(struct boot_editor *boot_editor)