mount: create proper mounter for OpenBSD#59
Merged
kolyshkin merged 1 commit intomoby:masterfrom Feb 24, 2021
Merged
Conversation
d585959 to
6e3871a
Compare
thaJeztah
requested changes
Jan 4, 2021
Member
thaJeztah
left a comment
There was a problem hiding this comment.
Thanks!
Could you perhaps include this as the commit message ? (Perhaps also a note/comment in the code to explain that more filesystems can be added in future, but I'm ok with skipping that if it's adding too much noise in the code)
OpenBSD's mount(2) works differently since it uses separate structs to present
options for different filesystems, unlike in FreeBSD. It also means that support
for other filesystems need to be added explicitly. I'm not sure which ones are
required for now so I just write support for only FFS, which is the go-to
filesystem used by OpenBSD systems.
6e3871a to
fa637b3
Compare
Member
|
@cpuguy83 @kolyshkin PTAL |
kolyshkin
reviewed
Jan 4, 2021
kolyshkin
reviewed
Jan 4, 2021
kolyshkin
reviewed
Jan 4, 2021
Collaborator
|
@yukiisbored thanks for your contribution, I left a few review comments. |
OpenBSD's mount(2) works differently since it uses separate structs to present options for different filesystems, unlike in FreeBSD. It also means that support for other filesystems need to be added explicitly. I'm not sure which ones are required for now so I just write support for only FFS, which is the go-to filesystem used by OpenBSD systems. Signed-off-by: Muhammad Kaisar Arkhan <[email protected]>
fa637b3 to
eff8446
Compare
Member
|
@kolyshkin looks like the PR was updated; PTAL |
kolyshkin
reviewed
Feb 16, 2021
| source: device, | ||
| target: target, | ||
| flags: flag, | ||
| err: fmt.Errorf("unsupported file system type: %s", mType), |
Collaborator
There was a problem hiding this comment.
I'd use string concatenation here (it's a bit faster):
Suggested change
| err: fmt.Errorf("unsupported file system type: %s", mType), | |
| err: errors.New("unsupported file system type: " + mType), |
but feel free to ignore (not that this is a hot path)
Member
|
Thanks!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is made for the sysutils/docker-cli port which I maintain, as moby/sys is part of the vendored libraries for docker/cli.
While I could stub this out (the same way as how it is on darwin and windows), I decided to actually write a proper mounter since it seems there's intention to actually bring OpenBSD support (as seen in cb807b1).
OpenBSD's mount(2) works differently since it uses separate structs to present options for different filesystems, unlike in FreeBSD. It also means that support for other filesystems need to be added explicitly. I'm not sure which ones are required for now so I just write support for only FFS, which is the go-to filesystem used by OpenBSD systems.