Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158021490
D40081.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40081.diff
View Options
diff --git a/stand/efi/include/efilib.h b/stand/efi/include/efilib.h
--- a/stand/efi/include/efilib.h
+++ b/stand/efi/include/efilib.h
@@ -97,6 +97,7 @@
EFI_HANDLE efi_devpath_handle(EFI_DEVICE_PATH *);
EFI_DEVICE_PATH *efi_devpath_last_node(EFI_DEVICE_PATH *);
EFI_DEVICE_PATH *efi_devpath_trim(EFI_DEVICE_PATH *);
+EFI_DEVICE_PATH *efi_devpath_next_instance(EFI_DEVICE_PATH *);
bool efi_devpath_match(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *);
bool efi_devpath_match_node(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *);
bool efi_devpath_is_prefix(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *);
diff --git a/stand/efi/libefi/devpath.c b/stand/efi/libefi/devpath.c
--- a/stand/efi/libefi/devpath.c
+++ b/stand/efi/libefi/devpath.c
@@ -575,6 +575,23 @@
return (devpath);
}
+/*
+ * Walk device path nodes, return next instance or end node.
+ */
+EFI_DEVICE_PATH *
+efi_devpath_next_instance(EFI_DEVICE_PATH *devpath)
+{
+ while (!IsDevicePathEnd(devpath)) {
+ devpath = NextDevicePathNode(devpath);
+ if (IsDevicePathEndType(devpath) &&
+ devpath->SubType == END_INSTANCE_DEVICE_PATH_SUBTYPE) {
+ devpath = NextDevicePathNode(devpath);
+ break;
+ }
+ }
+ return (devpath);
+}
+
EFI_DEVICE_PATH *
efi_devpath_trim(EFI_DEVICE_PATH *devpath)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 28, 2:19 PM (12 h, 31 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33587754
Default Alt Text
D40081.diff (1 KB)
Attached To
Mode
D40081: libefi: add efi_devpath_next_instance()
Attached
Detach File
Event Timeline
Log In to Comment