Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160194419
D29620.id86941.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
822 B
Referenced Files
None
Subscribers
None
D29620.id86941.diff
View Options
Index: usr.sbin/efivar/efivar.c
===================================================================
--- usr.sbin/efivar/efivar.c
+++ usr.sbin/efivar/efivar.c
@@ -118,15 +118,23 @@
static void
breakdown_name(char *name, efi_guid_t *guid, char **vname)
{
- char *cp;
-
- cp = strrchr(name, '-');
- if (cp == NULL)
- rep_errx(1, "Invalid name: %s", name);
- *vname = cp + 1;
- *cp = '\0';
- if (efi_name_to_guid(name, guid) < 0)
- rep_errx(1, "Invalid guid %s", name);
+ char *cp, *ocp;
+ bool again = true;
+
+ ocp = NULL;
+ while (again) {
+ again = false;
+ cp = strrchr(name, '-');
+ if (cp == NULL)
+ rep_errx(1, "Invalid guid: %s", name);
+ if (ocp != NULL)
+ *ocp = '-';
+ *vname = cp + 1;
+ *cp = '\0';
+ ocp = cp;
+ if (efi_name_to_guid(name, guid) < 0)
+ again = true;
+ }
}
static uint8_t *
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 23, 1:52 AM (3 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34224696
Default Alt Text
D29620.id86941.diff (822 B)
Attached To
Mode
D29620: efivar: Attempt to fix setting/printing/deleting EFI vars with '-' in their name
Attached
Detach File
Event Timeline
Log In to Comment