From patchwork Wed Jun 6 13:59:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 925858 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4119L73xMMz9s1R for ; Thu, 7 Jun 2018 00:00:31 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4119L70n4czF1yF for ; Thu, 7 Jun 2018 00:00:31 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=redhat.com (client-ip=209.85.128.180; helo=mail-wr0-f180.google.com; envelope-from=javierm@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4119KK6zvLzF1s5 for ; Wed, 6 Jun 2018 23:59:48 +1000 (AEST) Received: by mail-wr0-f180.google.com with SMTP id f16-v6so6443069wrm.3 for ; Wed, 06 Jun 2018 06:59:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DrDhvLX5tjXCxevvVvP0xx+MAHvxfUhkGDZm+V+zyCw=; b=l4B4EEojQZMu6/aolRYY4LocNntNWEflD73EcTmIzzoyW74hL4+37TsU8Gsh9JNqr8 LG8q6Wp7YnIonOXo7xQO78S4sEGgulFxjBboVNaJ1Q2WaXz00In9bvsfDhRsDyqXAeTY bCmSZ4bMw6vXSYqD3SBAte9/JbuH+2lYOH0YXEGMvJMaX//m9VHp5iEsRXMZSNUW8eas NyIWvvk0RCWSvSHWAGCatAZr2+ZYmwC1bEL1U2YWttr4mr1EP2duNL2dNefcwaShmVN4 yx5qeFCDQ1FM2RihJv9J4Vdww00+hqzQu/oXYKs6W8MnYUMiACq0nvmypzrEhspw6qJd A1BA== X-Gm-Message-State: APt69E1HN+mZOgmyq7qS4+Z156B3YE9yCLD8RxwIpKNrICd8xK9+i8AB SnjYaUBfv7ip4OQoGLgl+CwcErU1l78= X-Google-Smtp-Source: ADUXVKLN31HtBHIoYig0m0rzD3Bk4v4fMy/anrH+sWKCAC7ekb2Qa4bRhmx85RCbevRWbcoR+Yy6jA== X-Received: by 2002:adf:a686:: with SMTP id t6-v6mr2429326wrc.51.1528293584993; Wed, 06 Jun 2018 06:59:44 -0700 (PDT) Received: from minerva.home ([90.77.100.34]) by smtp.gmail.com with ESMTPSA id a184-v6sm4953961wmf.30.2018.06.06.06.59.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Jun 2018 06:59:44 -0700 (PDT) From: Javier Martinez Canillas To: petitboot@lists.ozlabs.org Subject: [PATCH 0/3] discover/grub: Some improvements and fixes for BLS support Date: Wed, 6 Jun 2018 15:59:33 +0200 Message-Id: <20180606135936.2461-1-javierm@redhat.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Javier Martinez Canillas , Peter Jones , Jan Hlavac , Samuel Mendoza-Jonas MIME-Version: 1.0 Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" Hello, This series contains some improvements and fixes for issues that I found when doing more extensive testing of the Petitboot BLS support. Patch #1 is just a small fix for the parser_scandir() stub function used in the test harness. Patch #2 allows BLS snippets to not only be in a /boot partition but also in the root partition if /boot isn't a mount point. This configuration is already supported by the grub.cfg file but I missed for BLS files. Patch #3 improves the environment variables evaluation for BLS files, to be in par of what's supported by the grub.cfg file. Best regards, Javier Javier Martinez Canillas (3): test/parser: Make parser_scandir() ignore files with path len less than dir discover/grub: Use different paths to search for the BLS directory discover/grub: Improve BLS grub environment variables expansion discover/grub2/blscfg.c | 106 ++++++++++++++---- .../test-grub2-blscfg-default-filename.c | 8 +- test/parser/test-grub2-blscfg-default-index.c | 14 ++- test/parser/test-grub2-blscfg-default-title.c | 8 +- test/parser/test-grub2-blscfg-multiple-bls.c | 7 +- test/parser/test-grub2-blscfg-opts-config.c | 2 + test/parser/test-grub2-blscfg-opts-grubenv.c | 6 +- test/parser/utils.c | 3 + 8 files changed, 119 insertions(+), 35 deletions(-)