mirror of
https://github.com/restic/restic.git
synced 2026-04-10 07:08:50 +00:00
uint64(stat.Rdev) works on both platforms
This commit is contained in:
@@ -14,15 +14,6 @@ func (node *Node) OpenForReading() (*os.File, error) {
|
||||
return file, err
|
||||
}
|
||||
|
||||
func (node *Node) fillTimes(stat *syscall.Stat_t) {
|
||||
node.ChangeTime = time.Unix(stat.Ctim.Unix())
|
||||
node.AccessTime = time.Unix(stat.Atim.Unix())
|
||||
}
|
||||
|
||||
func (node *Node) fillDevice(stat *syscall.Stat_t) {
|
||||
node.Device = stat.Rdev
|
||||
}
|
||||
|
||||
func (node *Node) createDevAt(path string) error {
|
||||
return syscall.Mknod(path, syscall.S_IFBLK|0600, int(node.Device))
|
||||
}
|
||||
@@ -35,6 +26,11 @@ func (node *Node) createFifoAt(path string) error {
|
||||
return syscall.Mkfifo(path, 0600)
|
||||
}
|
||||
|
||||
func (node *Node) fillTimes(stat *syscall.Stat_t) {
|
||||
node.ChangeTime = time.Unix(stat.Ctim.Unix())
|
||||
node.AccessTime = time.Unix(stat.Atim.Unix())
|
||||
}
|
||||
|
||||
func changeTime(stat *syscall.Stat_t) time.Time {
|
||||
return time.Unix(stat.Ctim.Unix())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user