Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153842506
D29620.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
794 B
Referenced Files
None
Subscribers
None
D29620.id.diff
View Options
diff --git a/usr.sbin/efivar/efivar.c b/usr.sbin/efivar/efivar.c
--- a/usr.sbin/efivar/efivar.c
+++ b/usr.sbin/efivar/efivar.c
@@ -118,15 +118,24 @@
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;
+
+ ocp = NULL;
+ while (true) {
+ cp = strrchr(name, '-');
+ if (cp == NULL) {
+ if (ocp != NULL)
+ *ocp = '-';
+ rep_errx(1, "Invalid guid in: %s", name);
+ }
+ if (ocp != NULL)
+ *ocp = '-';
+ *vname = cp + 1;
+ *cp = '\0';
+ ocp = cp;
+ if (efi_name_to_guid(name, guid) >= 0)
+ break;
+ }
}
static uint8_t *
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 25, 4:50 AM (11 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32109872
Default Alt Text
D29620.id.diff (794 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