While at it, made sure there's no space between // and nolint
(as it is required for comments aimed for tools not humans).
This fixes the following golangci-lint warning:
> WARN [runner/nolint_filter] Found unknown linters in //nolint directives: golint
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
The lgetxattr(2), lsetxattr(2), and llistxattr(2) syscalls on Linux
return ENOTSUP instead of EOPNOTSUPP. The same applies to getxattr(2),
setxattr(2), and listxattr(2) on macOS.
Note that EOPNOTSUPP and ENOTSUP have the same value in Linux (refer to
errno(3)).
Signed-off-by: Minseo Kim <kimminss0@outlook.kr>
- Closes#2113
`copy.DirCopy` contains code to create named sockets matching those on
the source; however, this operation closes the socket, removing it
implicitly from the destination and causing later chown and chmod
operations to fail.
This commit creates matching file system nodes directly without opening
a socket or invoking the auto-removal semantics of a listener.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
gofumpt is a superset of gofmt, enabling some more code formatting
rules.
This commit is brought to you by
gofumpt -w .
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This way the error messages are more informative.
Convert all the users accordingly (assuming there are no users outside
of this repo).
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Preservation of user.* xattrs is supported by most (if not all) other
drivers, and it's especially useful for containers that run under a
PaX kernel where "user.pax.flags" is used to store PaX flags.
Signed-off-by: Zac Medico <zmedico@gmail.com>
Some platforms store s.Rdev as unit32, translate to unit64 so it
will compile.
Also add function to make it clear that the object is a whiteout object.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
We failed to detect char devices as those were not covered by the
`ModeDevice` check. Fix this by using the entire FileMode mask as
suggested by the standard library.
Also change the "unknown file type" error to include the mode to
ease debugging potential regressions in the future.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
The vfs driver already has logic that avoids use of the copy package
when we're not on Linux, so provide the same fallback in the copy
package for non-cgo cases.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>