Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
3a3955d8
O
OpenCorePKG_MOD
项目概览
btwise
/
OpenCorePKG_MOD
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OpenCorePKG_MOD
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3a3955d8
编写于
4月 12, 2019
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OcBootManagementLib: Skip self entry
上级
096bb8fa
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
3 deletion
+24
-3
Include/Library/OcBootManagementLib.h
Include/Library/OcBootManagementLib.h
+5
-1
Library/OcBootManagementLib/OcBootManagementLib.c
Library/OcBootManagementLib/OcBootManagementLib.c
+18
-2
Tests/BlessTest/BlessTest.c
Tests/BlessTest/BlessTest.c
+1
-0
未找到文件。
Include/Library/OcBootManagementLib.h
浏览文件 @
3a3955d8
...
...
@@ -122,6 +122,7 @@ OcFillBootEntry (
@param[out] BootEntries List of boot entries (allocated from pool).
@param[out] Count Number of boot entries.
@param[out] AllocCount Number of allocated boot entries.
@param[in] LoadHandle Load handle to skip.
@param[in] Describe Automatically fill description fields
@retval EFI_SUCCESS Executed successfully and found entries.
...
...
@@ -133,6 +134,7 @@ OcScanForBootEntries (
OUT
OC_BOOT_ENTRY
**
BootEntries
,
OUT
UINTN
*
Count
,
OUT
UINTN
*
AllocCount
OPTIONAL
,
IN
EFI_HANDLE
LoadHandle
OPTIONAL
,
IN
BOOLEAN
Describe
);
...
...
@@ -257,6 +259,7 @@ EFI_STATUS
@param[in] TimeOutSeconds Default entry selection timeout (pass 0 to ignore).
@param[in] StartImage Image starting routine used.
@param[in] ShowPicker Show boot menu or just boot the default option.
@param[in] LoadHandle Load handle, skips main handle on this handle.
@retval does not return unless a fatal error happened.
**/
...
...
@@ -266,7 +269,8 @@ OcRunSimpleBootPicker (
IN
UINT32
BootPolicy
,
IN
UINT32
TimeoutSeconds
,
IN
OC_IMAGE_START
StartImage
,
IN
BOOLEAN
ShowPicker
IN
BOOLEAN
ShowPicker
,
IN
EFI_HANDLE
LoadHandle
OPTIONAL
);
#endif // OC_BOOT_MANAGEMENT_LIB_H
Library/OcBootManagementLib/OcBootManagementLib.c
浏览文件 @
3a3955d8
...
...
@@ -774,6 +774,7 @@ OcScanForBootEntries (
OUT
OC_BOOT_ENTRY
**
BootEntries
,
OUT
UINTN
*
Count
,
OUT
UINTN
*
AllocCount
OPTIONAL
,
IN
EFI_HANDLE
LoadHandle
OPTIONAL
,
IN
BOOLEAN
Describe
)
{
...
...
@@ -784,6 +785,7 @@ OcScanForBootEntries (
OC_BOOT_ENTRY
*
Entries
;
UINTN
EntryIndex
;
CHAR16
*
DevicePath
;
UINTN
EntryCount
;
Status
=
gBS
->
LocateHandleBuffer
(
ByProtocol
,
...
...
@@ -811,13 +813,25 @@ OcScanForBootEntries (
EntryIndex
=
0
;
for
(
Index
=
0
;
Index
<
NoHandles
;
++
Index
)
{
Entry
Index
+
=
OcFillBootEntry
(
Entry
Count
=
OcFillBootEntry
(
BootPolicy
,
Policy
,
Handles
[
Index
],
&
Entries
[
EntryIndex
],
&
Entries
[
EntryIndex
+
1
]
);
if
(
LoadHandle
==
Handles
[
Index
]
&&
EntryCount
>
0
)
{
DEBUG
((
DEBUG_INFO
,
"Skipping self load handle entry %p
\n
"
,
LoadHandle
));
--
EntryCount
;
CopyMem
(
&
Entries
[
EntryIndex
+
1
],
&
Entries
[
EntryIndex
],
sizeof
(
Entries
[
EntryIndex
])
*
EntryCount
);
}
EntryIndex
+=
EntryCount
;
}
FreePool
(
Handles
);
...
...
@@ -971,7 +985,8 @@ OcRunSimpleBootPicker (
IN
UINT32
BootPolicy
,
IN
UINT32
TimeoutSeconds
,
IN
OC_IMAGE_START
StartImage
,
IN
BOOLEAN
ShowPicker
IN
BOOLEAN
ShowPicker
,
IN
EFI_HANDLE
LoadHandle
OPTIONAL
)
{
EFI_STATUS
Status
;
...
...
@@ -1007,6 +1022,7 @@ OcRunSimpleBootPicker (
&
Entries
,
&
EntryCount
,
NULL
,
LoadHandle
,
TRUE
);
...
...
Tests/BlessTest/BlessTest.c
浏览文件 @
3a3955d8
...
...
@@ -86,6 +86,7 @@ TestBless (
&
Entries
,
&
EntryCount
,
NULL
,
NULL
,
TRUE
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录