Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lmcBg-00087r-EC for mharc-grub-devel@gnu.org; Fri, 28 May 2021 09:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmcBa-0007wb-9B for grub-devel@gnu.org; Fri, 28 May 2021 09:05:59 -0400 Received: from mail-lj1-f182.google.com ([209.85.208.182]:35437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmcBW-0002Ib-Lr for grub-devel@gnu.org; Fri, 28 May 2021 09:05:58 -0400 Received: by mail-lj1-f182.google.com with SMTP id f12so5184906ljp.2 for ; Fri, 28 May 2021 06:05:54 -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:in-reply-to :references:mime-version:content-transfer-encoding; bh=+E/tjrZQbUXcuOG0GXnkDeM9jQs6VNgPiCQmQMMFEck=; b=S9g82hQGYY+aeAqs7ZxRnpj4nY2oAFEyjTyWYN6iSLmkfLrUHEIOMbJyGK6rZVO8Ih Ty1/+XiTIl9cng0YQaEjRprnPV3yij+mwoP+wm7jp4iP5Ha3YKxZpMal2uM7Rz/oUJrO N2//w6FXYog1vW5Gz4McSyhI9B4T7w39+AI723vFwZNuegNOqmzalIJFMLaGcG0qAnyx mkqdQ1Csh6kTRAvFpbNeKAj1kYnpJsz9O0hvyf5nhdUmxFn2a8ZflqcLX8FyMO6tatiI StBHn6iDHDWYBnR1DT86G54h1EjfsaTbZ+ZpNZH0mjjCG7Qy0ZSGTEKuPr8SzTRYz9TH PyWA== X-Gm-Message-State: AOAM533BgQNFmniYvtZugXj7qImvK/0duij2zXmySGX4/+sC+qNlJGFC X13Z1NhZGgjEfDaHwArJLxOHaCHmDOCOtivOzLT/uw== X-Google-Smtp-Source: ABdhPJzdmBfEbKkOl49pbYA28LgpHDLxUVtTpTaQL9MNs0AdEJgkNRWdJoZmuRAiitvBJqbPFXs4Jg== X-Received: by 2002:a05:651c:218:: with SMTP id y24mr6320000ljn.328.1622207152346; Fri, 28 May 2021 06:05:52 -0700 (PDT) Received: from localhost.localdomain (109-252-124-217.nat.spd-mgts.ru. [109.252.124.217]) by smtp.gmail.com with ESMTPSA id m25sm468129lfr.288.2021.05.28.06.05.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 May 2021 06:05:52 -0700 (PDT) From: Nikita Ermakov To: GRUB development mailing list Cc: Ard Biesheuvel , Atish Patra , Daniel Kiper , Heinrich Schuchardt , Leif Lindholm , Nikita Ermakov Subject: [PATCH 8/8] linux: Make load_file2_guid and device_path_guid static Date: Fri, 28 May 2021 16:04:57 +0300 Message-Id: <20210528130457.13501-9-arei@altlinux.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210528130457.13501-1-arei@altlinux.org> References: <20210528130457.13501-1-arei@altlinux.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=209.85.208.182; envelope-from=coffe92@gmail.com; helo=mail-lj1-f182.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2021 13:05:59 -0000 The load_file2_guid and device_path_guid variables must be preserved outside of the function scope. Signed-off-by: Nikita Ermakov --- grub-core/loader/efi/linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index 7c71d0336..8fd8e54e1 100644 --- a/grub-core/loader/efi/linux.c +++ b/grub-core/loader/efi/linux.c @@ -51,6 +51,8 @@ static grub_addr_t initrd_end; static struct grub_linux_initrd_context initrd_ctx = { 0, 0, 0 }; static grub_efi_handle_t initrd_lf2_handle; static int initrd_use_loadfile2; +static grub_efi_guid_t load_file2_guid = GRUB_EFI_LOAD_FILE2_PROTOCOL_GUID; +static grub_efi_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID; grub_err_t grub_arch_efi_linux_check_image (struct linux_arch_kernel_header * lh) @@ -330,8 +332,6 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), { int initrd_size, initrd_pages; void *initrd_mem = NULL; - grub_efi_guid_t load_file2_guid = GRUB_EFI_LOAD_FILE2_PROTOCOL_GUID; - grub_efi_guid_t device_path_guid = GRUB_EFI_DEVICE_PATH_GUID; grub_efi_boot_services_t *b; grub_efi_status_t status; -- 2.31.1