2024-08-26 21:03:25 +00:00
|
|
|
package fs
|
2018-06-16 06:48:45 +00:00
|
|
|
|
2024-02-23 00:31:20 +00:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"syscall"
|
2024-08-26 21:03:25 +00:00
|
|
|
|
|
|
|
"github.com/restic/restic/internal/restic"
|
2024-02-23 00:31:20 +00:00
|
|
|
)
|
2018-06-16 06:48:45 +00:00
|
|
|
|
2024-08-26 20:35:22 +00:00
|
|
|
func nodeRestoreSymlinkTimestamps(_ string, _ [2]syscall.Timespec) error {
|
2018-06-16 06:48:45 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-10-18 21:39:42 +00:00
|
|
|
func (s statT) atim() syscall.Timespec { return s.Atimespec }
|
|
|
|
func (s statT) mtim() syscall.Timespec { return s.Mtimespec }
|
|
|
|
func (s statT) ctim() syscall.Timespec { return s.Ctimespec }
|
2018-06-16 06:48:45 +00:00
|
|
|
|
2024-08-26 20:35:22 +00:00
|
|
|
// nodeRestoreExtendedAttributes is a no-op on netbsd.
|
2024-08-26 21:03:25 +00:00
|
|
|
func nodeRestoreExtendedAttributes(_ *restic.Node, _ string) error {
|
2024-05-17 20:18:20 +00:00
|
|
|
return nil
|
2018-06-16 06:48:45 +00:00
|
|
|
}
|
|
|
|
|
2024-08-26 20:35:22 +00:00
|
|
|
// nodeFillExtendedAttributes is a no-op on netbsd.
|
2024-08-26 21:03:25 +00:00
|
|
|
func nodeFillExtendedAttributes(_ *restic.Node, _ string, _ bool) error {
|
2024-05-17 20:18:20 +00:00
|
|
|
return nil
|
2018-06-16 06:48:45 +00:00
|
|
|
}
|
|
|
|
|
2024-05-17 20:18:20 +00:00
|
|
|
// IsListxattrPermissionError is a no-op on netbsd.
|
2024-01-31 19:48:03 +00:00
|
|
|
func IsListxattrPermissionError(_ error) bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2024-08-26 20:35:22 +00:00
|
|
|
// nodeRestoreGenericAttributes is no-op on netbsd.
|
2024-08-26 21:03:25 +00:00
|
|
|
func nodeRestoreGenericAttributes(node *restic.Node, _ string, warn func(msg string)) error {
|
|
|
|
return restic.HandleAllUnknownGenericAttributesFound(node.GenericAttributes, warn)
|
2024-02-23 00:31:20 +00:00
|
|
|
}
|
|
|
|
|
2024-08-26 20:35:22 +00:00
|
|
|
// nodeFillGenericAttributes is a no-op on netbsd.
|
2024-08-26 21:03:25 +00:00
|
|
|
func nodeFillGenericAttributes(_ *restic.Node, _ string, _ os.FileInfo, _ *statT) (allowExtended bool, err error) {
|
2024-02-23 00:31:20 +00:00
|
|
|
return true, nil
|
|
|
|
}
|