public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Chen A Chen <chen.a.chen@intel.com>
To: edk2-devel@lists.01.org
Cc: Chen A Chen <chen.a.chen@intel.com>,
	Jian J Wang <jian.j.wang@intel.com>, Hao Wu <hao.a.wu@intel.com>,
	Zhang Chao B <chao.b.zhang@intel.com>
Subject: [PATCH v3 2/4] MdeModulePkg/CapsuleApp: Add a function used to get next DevicePath
Date: Tue, 29 Jan 2019 15:43:39 +0800	[thread overview]
Message-ID: <20190129074341.7032-3-chen.a.chen@intel.com> (raw)
In-Reply-To: <20190129074341.7032-1-chen.a.chen@intel.com>

BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482

Add a new function to support Capsule-on-Disk feature.
This function is used to get next full DevicePath from a load option.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Zhang Chao B <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
---
 MdeModulePkg/Include/Library/UefiBootManagerLib.h | 21 +++++++++++++++++++-
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c  | 24 ++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Include/Library/UefiBootManagerLib.h b/MdeModulePkg/Include/Library/UefiBootManagerLib.h
index bfc0cb86f8..64347ff160 100644
--- a/MdeModulePkg/Include/Library/UefiBootManagerLib.h
+++ b/MdeModulePkg/Include/Library/UefiBootManagerLib.h
@@ -1,7 +1,7 @@
 /** @file
   Provide Boot Manager related library APIs.
 
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>
 (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
@@ -445,6 +445,25 @@ EfiBootManagerGetBootManagerMenu (
   EFI_BOOT_MANAGER_LOAD_OPTION *BootOption
   );
 
+/**
+  Get the next possible full path pointing to the load option.
+  The routine doesn't guarantee the returned full path points to an existing
+  file, and it also doesn't guarantee the existing file is a valid load option.
+  BmGetNextLoadOptionBuffer() guarantees.
+
+  @param FilePath  The device path pointing to a load option.
+                   It could be a short-form device path.
+  @param FullPath  The full path returned by the routine in last call.
+                   Set to NULL in first call.
+
+  @return The next possible full path pointing to the load option.
+          Caller is responsible to free the memory.
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+EfiBootManagerGetNextFullDevicePath (
+  IN  EFI_DEVICE_PATH_PROTOCOL          *FilePath,
+  IN  EFI_DEVICE_PATH_PROTOCOL          *FullPath
+  );
 
 /**
   Get the load option by its device path.
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index 6a23477eb8..684d7b8b1b 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -1,7 +1,7 @@
 /** @file
   Library functions which relates with booting.
 
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>
 (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
@@ -2461,3 +2461,25 @@ EfiBootManagerGetBootManagerMenu (
   }
 }
 
+/**
+  Get the next possible full path pointing to the load option.
+  The routine doesn't guarantee the returned full path points to an existing
+  file, and it also doesn't guarantee the existing file is a valid load option.
+  BmGetNextLoadOptionBuffer() guarantees.
+
+  @param FilePath  The device path pointing to a load option.
+                   It could be a short-form device path.
+  @param FullPath  The full path returned by the routine in last call.
+                   Set to NULL in first call.
+
+  @return The next possible full path pointing to the load option.
+          Caller is responsible to free the memory.
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+EfiBootManagerGetNextFullDevicePath (
+  IN  EFI_DEVICE_PATH_PROTOCOL          *FilePath,
+  IN  EFI_DEVICE_PATH_PROTOCOL          *FullPath
+  )
+{
+  return BmGetNextLoadOptionDevicePath(FilePath, FullPath);
+}
-- 
2.16.2.windows.1



  parent reply	other threads:[~2019-01-29  7:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29  7:43 [PATCH v3 0/4] Introduce CapsuleApp patch v3 Chen A Chen
2019-01-29  7:43 ` [PATCH v3 1/4] MdePkg/UefiSpec.h: Add definition to support Capsule-on-Disk feature Chen A Chen
2019-01-29  9:00   ` Ni, Ray
2019-01-29  7:43 ` Chen A Chen [this message]
2019-01-29 14:02   ` [PATCH v3 2/4] MdeModulePkg/CapsuleApp: Add a function used to get next DevicePath Wang, Jian J
2019-01-29  7:43 ` [PATCH v3 3/4] MdeModulePkg/CapsuleApp: Add functions to support Capsule-on-Disk Chen A Chen
2019-01-29 14:02   ` Wang, Jian J
2019-01-29  7:43 ` [PATCH v3 4/4] MdeModulePkg/CapsuleApp: Enhance CapsuleApp " Chen A Chen
2019-01-29 14:01   ` Wang, Jian J

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190129074341.7032-3-chen.a.chen@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox