diff --git a/internal/fs/node_aix.go b/internal/fs/node_aix.go deleted file mode 100644 index 19c5a2efe..000000000 --- a/internal/fs/node_aix.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build aix -// +build aix - -package fs - -import "github.com/restic/restic/internal/restic" - -// nodeRestoreExtendedAttributes is a no-op on AIX. -func nodeRestoreExtendedAttributes(_ *restic.Node, _ string) error { - return nil -} - -// nodeFillExtendedAttributes is a no-op on AIX. -func nodeFillExtendedAttributes(_ *restic.Node, _ string, _ bool) error { - return nil -} - -// nodeRestoreGenericAttributes is no-op on AIX. -func nodeRestoreGenericAttributes(node *restic.Node, _ string, warn func(msg string)) error { - return restic.HandleAllUnknownGenericAttributesFound(node.GenericAttributes, warn) -} - -// nodeFillGenericAttributes is a no-op on AIX. -func nodeFillGenericAttributes(_ *restic.Node, _ string, _ *ExtendedFileInfo) error { - return nil -} diff --git a/internal/fs/node_netbsd.go b/internal/fs/node_netbsd.go deleted file mode 100644 index 1bf00a136..000000000 --- a/internal/fs/node_netbsd.go +++ /dev/null @@ -1,23 +0,0 @@ -package fs - -import "github.com/restic/restic/internal/restic" - -// nodeRestoreExtendedAttributes is a no-op on netbsd. -func nodeRestoreExtendedAttributes(_ *restic.Node, _ string) error { - return nil -} - -// nodeFillExtendedAttributes is a no-op on netbsd. -func nodeFillExtendedAttributes(_ *restic.Node, _ string, _ bool) error { - return nil -} - -// nodeRestoreGenericAttributes is no-op on netbsd. -func nodeRestoreGenericAttributes(node *restic.Node, _ string, warn func(msg string)) error { - return restic.HandleAllUnknownGenericAttributesFound(node.GenericAttributes, warn) -} - -// nodeFillGenericAttributes is a no-op on netbsd. -func nodeFillGenericAttributes(_ *restic.Node, _ string, _ *ExtendedFileInfo) error { - return nil -} diff --git a/internal/fs/node_noxattr.go b/internal/fs/node_noxattr.go new file mode 100644 index 000000000..27bc6913a --- /dev/null +++ b/internal/fs/node_noxattr.go @@ -0,0 +1,18 @@ +//go:build aix || netbsd || openbsd +// +build aix netbsd openbsd + +package fs + +import ( + "github.com/restic/restic/internal/restic" +) + +// nodeRestoreExtendedAttributes is a no-op +func nodeRestoreExtendedAttributes(_ *restic.Node, _ string) error { + return nil +} + +// nodeFillExtendedAttributes is a no-op +func nodeFillExtendedAttributes(_ *restic.Node, _ string, _ bool) error { + return nil +} diff --git a/internal/fs/node_openbsd.go b/internal/fs/node_openbsd.go deleted file mode 100644 index 1041622af..000000000 --- a/internal/fs/node_openbsd.go +++ /dev/null @@ -1,23 +0,0 @@ -package fs - -import "github.com/restic/restic/internal/restic" - -// nodeRestoreExtendedAttributes is a no-op on openbsd. -func nodeRestoreExtendedAttributes(_ *restic.Node, _ string) error { - return nil -} - -// nodeFillExtendedAttributes is a no-op on openbsd. -func nodeFillExtendedAttributes(_ *restic.Node, _ string, _ bool) error { - return nil -} - -// nodeRestoreGenericAttributes is no-op on openbsd. -func nodeRestoreGenericAttributes(node *restic.Node, _ string, warn func(msg string)) error { - return restic.HandleAllUnknownGenericAttributesFound(node.GenericAttributes, warn) -} - -// fillGenericAttributes is a no-op on openbsd. -func nodeFillGenericAttributes(_ *restic.Node, _ string, _ *ExtendedFileInfo) error { - return nil -} diff --git a/internal/fs/node_unix.go b/internal/fs/node_unix.go index 5f08f3623..e88e54251 100644 --- a/internal/fs/node_unix.go +++ b/internal/fs/node_unix.go @@ -5,8 +5,20 @@ package fs import ( "os" + + "github.com/restic/restic/internal/restic" ) func lchown(name string, uid, gid int) error { return os.Lchown(name, uid, gid) } + +// nodeRestoreGenericAttributes is no-op. +func nodeRestoreGenericAttributes(node *restic.Node, _ string, warn func(msg string)) error { + return restic.HandleAllUnknownGenericAttributesFound(node.GenericAttributes, warn) +} + +// nodeFillGenericAttributes is a no-op. +func nodeFillGenericAttributes(_ *restic.Node, _ string, _ *ExtendedFileInfo) error { + return nil +} diff --git a/internal/fs/node_xattr.go b/internal/fs/node_xattr.go index aacc216dc..e1ddf9826 100644 --- a/internal/fs/node_xattr.go +++ b/internal/fs/node_xattr.go @@ -65,16 +65,6 @@ func handleXattrErr(err error) error { } } -// nodeRestoreGenericAttributes is no-op. -func nodeRestoreGenericAttributes(node *restic.Node, _ string, warn func(msg string)) error { - return restic.HandleAllUnknownGenericAttributesFound(node.GenericAttributes, warn) -} - -// nodeFillGenericAttributes is a no-op. -func nodeFillGenericAttributes(_ *restic.Node, _ string, _ *ExtendedFileInfo) error { - return nil -} - func nodeRestoreExtendedAttributes(node *restic.Node, path string) error { expectedAttrs := map[string]struct{}{} for _, attr := range node.ExtendedAttributes {