New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fromStatT() implementation for NetBSD #41441
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package system // import "github.com/docker/docker/pkg/system" | ||
|
||
import "syscall" | ||
|
||
// fromStatT converts a syscall.Stat_t type to a system.Stat_t type | ||
func fromStatT(s *syscall.Stat_t) (*StatT, error) { | ||
return &StatT{size: s.Size, | ||
mode: uint32(s.Mode), | ||
uid: s.Uid, | ||
gid: s.Gid, | ||
rdev: uint64(s.Rdev), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replying to both questions here: yeah, both conversions should be useless and can be removed (I've also locally patched them and double-checked them). @thaJeztah OK to open a new PR to remove them? Thank you very much @Viandc, @AkihiroSuda and @thaJeztah for the quick reviews and merge! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you have time to look at cleaning up the duplicates (I think if we keep the conversion in that one to take different cases into account, that's ok) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @thaJeztah, I've just opened #41448 that does that. |
||
mtim: s.Mtimespec}, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this conversion is redundant on netbsd, or did you add on purpose? (if so, perhaps this requires a
//nolint:unconvert
)