Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102565113
D38616.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
953 B
Referenced Files
None
Subscribers
None
D38616.diff
View Options
diff --git a/lib/libefivar/efivar-dp-xlate.c b/lib/libefivar/efivar-dp-xlate.c
--- a/lib/libefivar/efivar-dp-xlate.c
+++ b/lib/libefivar/efivar-dp-xlate.c
@@ -648,6 +648,7 @@
}
/* Handles /path/to/file */
+/* Handles /dev/foo/bar */
static int
path_to_dp(struct gmesh *mesh, char *path, efidp *dp)
{
@@ -667,9 +668,19 @@
}
dev = buf.f_mntfromname;
- if (strncmp(dev, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
- dev += sizeof(_PATH_DEV) -1;
- ep = rp + strlen(buf.f_mntonname);
+ /*
+ * If we're fed a raw /dev/foo/bar, then devfs is returned from the
+ * statfs call. In that case, use that dev and assume we have a path
+ * of nothing.
+ */
+ if (strcmp(dev, "devfs") == 0) {
+ dev = rp + sizeof(_PATH_DEV) - 1;
+ ep = NULL;
+ } else {
+ if (strncmp(dev, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
+ dev += sizeof(_PATH_DEV) - 1;
+ ep = rp + strlen(buf.f_mntonname);
+ }
efimedia = find_geom_efimedia(mesh, dev);
#ifdef notyet
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 3:25 AM (11 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14637770
Default Alt Text
D38616.diff (953 B)
Attached To
Mode
D38616: efivar: support device paths as well as mounted paths in path_to_dp
Attached
Detach File
Event Timeline
Log In to Comment