Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
c93ca600
Commit
c93ca600
authored
Jan 25, 2012
by
Fazlul Shahriar
Committed by
Anthony Martin
Jan 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os: pass tests on Plan 9 again
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/5563046
parent
0ae9d812
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
src/pkg/os/file_plan9.go
src/pkg/os/file_plan9.go
+6
-6
src/pkg/os/stat_plan9.go
src/pkg/os/stat_plan9.go
+5
-0
No files found.
src/pkg/os/file_plan9.go
View file @
c93ca600
...
...
@@ -7,6 +7,7 @@ package os
import
(
"runtime"
"syscall"
"time"
)
// File represents an open file descriptor.
...
...
@@ -299,15 +300,14 @@ func Chmod(name string, mode FileMode) error {
// Chtimes changes the access and modification times of the named
// file, similar to the Unix utime() or utimes() functions.
//
// The argument times are in nanoseconds, although the underlying
// filesystem may truncate or round the values to a more
// coarse time unit.
func
Chtimes
(
name
string
,
atimeNs
int64
,
mtimeNs
int64
)
error
{
// The underlying filesystem may truncate or round the values to a
// less precise time unit.
func
Chtimes
(
name
string
,
atime
time
.
Time
,
mtime
time
.
Time
)
error
{
var
d
Dir
d
.
Null
()
d
.
Atime
=
uint32
(
atime
Ns
/
1e9
)
d
.
Mtime
=
uint32
(
mtime
Ns
/
1e9
)
d
.
Atime
=
uint32
(
atime
.
Unix
()
)
d
.
Mtime
=
uint32
(
mtime
.
Unix
()
)
if
e
:=
syscall
.
Wstat
(
name
,
pdir
(
nil
,
&
d
));
e
!=
nil
{
return
&
PathError
{
"chtimes"
,
name
,
e
}
...
...
src/pkg/os/stat_plan9.go
View file @
c93ca600
...
...
@@ -97,3 +97,8 @@ func Stat(name string) (FileInfo, error) {
func
Lstat
(
name
string
)
(
FileInfo
,
error
)
{
return
Stat
(
name
)
}
// For testing.
func
atime
(
fi
FileInfo
)
time
.
Time
{
return
time
.
Unix
(
int64
(
fi
.
(
*
FileStat
)
.
Sys
.
(
*
Dir
)
.
Atime
),
0
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment