Page MenuHomeFreeBSD

efivar: support device paths as well as mounted paths in path_to_dp
ClosedPublic

Authored by imp on Feb 15 2023, 7:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 8:52 AM
Unknown Object (File)
Fri, Apr 26, 8:52 AM
Unknown Object (File)
Fri, Apr 26, 8:52 AM
Unknown Object (File)
Fri, Apr 26, 8:52 AM
Unknown Object (File)
Fri, Apr 26, 1:45 AM
Unknown Object (File)
Mar 16 2024, 3:24 AM
Unknown Object (File)
Mar 16 2024, 3:24 AM
Unknown Object (File)
Mar 16 2024, 3:23 AM
Subscribers
None

Details

Summary

In path_to_dp, allow passing in either the actual device path "eg
/dev/foo/bar" or the path where the device is mounted (say
/mnt/baz/bing). In the former case we'll assume the path within the
device is nothing (the relpath). In the latter, we'll take from the
mount point on down as the relpath.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Feb 15 2023, 7:51 PM
imp created this revision.

Is the purpose of this change to accept either a "/dev/foo/bar" or a "foo/bar"? Also, in your commit message could you check the word choice in "know the path passed in" ?

Is the purpose of this change to accept either a "/dev/foo/bar" or a "foo/bar"? Also, in your commit message could you check the word choice in "know the path passed in" ?

Not quite. The purpose of the change is to allow either /dev/foo/bar or /mnt/baz to be passed in.

I'll update the proposed commit message to see if my second attempt is any clearer.

asomers added inline comments.
lib/libefivar/efivar-dp-xlate.c
650–651

This comment is now out of date.

This revision is now accepted and ready to land.Feb 16 2023, 12:29 AM
This revision now requires review to proceed.Feb 16 2023, 12:40 AM
This revision is now accepted and ready to land.Feb 16 2023, 7:04 AM