OSDN Git Service

os: Correct Ctime_ns calculation.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 May 2011 18:08:48 +0000 (18:08 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 May 2011 18:08:48 +0000 (18:08 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174501 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/go/os/stat.go

index d6c7a54..8eb4ab4 100644 (file)
@@ -25,7 +25,7 @@ func fileInfoFromStat(name string, fi *FileInfo, lstat, stat *syscall.Stat_t) *F
        fi.Blocks = int64(stat.Blocks)
        fi.Atime_ns = int64(stat.Atime.Sec)*1e9 + int64(stat.Atime.Nsec)
        fi.Mtime_ns = int64(stat.Mtime.Sec)*1e9 + int64(stat.Mtime.Nsec)
-       fi.Ctime_ns = int64(stat.Ctime.Sec)*1e9 + int64(stat.Atime.Nsec)
+       fi.Ctime_ns = int64(stat.Ctime.Sec)*1e9 + int64(stat.Ctime.Nsec)
        for i := len(name)-1; i >= 0; i-- {
                if name[i] == '/' {
                        name = name[i+1:]