~ubuntu-branches/ubuntu/saucy/golang/saucy

« back to all changes in this revision

Viewing changes to src/pkg/os/stat_netbsd.go

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-07-08 05:52:37 UTC
  • mfrom: (29.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130708055237-at01839e0hp8z3ni
Tags: 2:1.1-1ubuntu1
016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
        "time"
10
10
)
11
11
 
12
 
func sameFile(sys1, sys2 interface{}) bool {
13
 
        stat1 := sys1.(*syscall.Stat_t)
14
 
        stat2 := sys2.(*syscall.Stat_t)
 
12
func sameFile(fs1, fs2 *fileStat) bool {
 
13
        stat1 := fs1.sys.(*syscall.Stat_t)
 
14
        stat2 := fs2.sys.(*syscall.Stat_t)
15
15
        return stat1.Dev == stat2.Dev && stat1.Ino == stat2.Ino
16
16
}
17
17
 
19
19
        fs := &fileStat{
20
20
                name:    basename(name),
21
21
                size:    int64(st.Size),
22
 
                modTime: timespecToTime(st.Mtim),
 
22
                modTime: timespecToTime(st.Mtimespec),
23
23
                sys:     st,
24
24
        }
25
25
        fs.mode = FileMode(st.Mode & 0777)
57
57
 
58
58
// For testing.
59
59
func atime(fi FileInfo) time.Time {
60
 
        return timespecToTime(fi.Sys().(*syscall.Stat_t).Atim)
 
60
        return timespecToTime(fi.Sys().(*syscall.Stat_t).Atimespec)
61
61
}