forked from TrueCloudLab/restic
uint64(stat.Rdev) works on both platforms
This commit is contained in:
parent
6ba11d8fb7
commit
adcde1988e
3 changed files with 13 additions and 26 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue