Skip to content

Use more functionality from golang.org/x/sys/unix#39707

Merged
tiborvass merged 3 commits intomoby:masterfrom
tklauser:more-x-sys-unix
Aug 23, 2019
Merged

Use more functionality from golang.org/x/sys/unix#39707
tiborvass merged 3 commits intomoby:masterfrom
tklauser:more-x-sys-unix

Conversation

@tklauser
Copy link
Copy Markdown
Contributor

@tklauser tklauser commented Aug 9, 2019

- What I did

Updated the vendored copy of the golang.org/x/sys package. Changed pkg/loopback, pkg/system and pkg/dmesg? to use functions, types and constants from golang.org/x/sys/unix` instead of duplicating them.

- How I did it

Replaced manual re-implementations of said functions, types and constants with equivalent counterparts provided by golang.org/x/sys/unix.

- How to verify it

Compare current implementation to respective counterparts in x/sys/unix.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Amazona collaria

@thaJeztah
Copy link
Copy Markdown
Member

😍 thanks!

@thaJeztah
Copy link
Copy Markdown
Member

@kolyshkin ptal

@thaJeztah
Copy link
Copy Markdown
Member

@tonistiigi @kolyshkin ptal

Copy link
Copy Markdown
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tklauser please rebase

@thaJeztah
Copy link
Copy Markdown
Member

vendoring was updated in #39726, which should have all the changes needed for this PR, so the vendor bump can be dropped here

This allows to merge the implementation for Linux and FreeBSD.

Signed-off-by: Tobias Klauser <[email protected]>
@tklauser
Copy link
Copy Markdown
Contributor Author

@tonistiigi @thaJeztah Thanks! Rebased and dropped the vendoring changes.

@thaJeztah
Copy link
Copy Markdown
Member

Thanks!

Hm.. interesting; we enabled the new DCO bot, but it looks like two new DCO-checks were added (there's now also a docker/dco-signed check) Perhaps that one already existed but not configured properly, and now got activated as well? 😂

Screenshot 2019-08-22 at 10 38 36

^^ @tiborvass

Comment thread pkg/system/utimes_unix.go
if err != nil {
return err
uts := []unix.Timespec{
unix.NsecToTimespec(syscall.TimespecToNsec(ts[0])),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well change LUtimesNano callers to send a []unix.Timespec instead. Can be done in a followup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will send a followup PR.

@tiborvass tiborvass merged commit 8fedab1 into moby:master Aug 23, 2019
@tklauser tklauser deleted the more-x-sys-unix branch August 26, 2019 06:18
@thaJeztah thaJeztah added this to the 20.03.0 milestone Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants