Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
file_plan9.go
src/pkg/os/file_plan9.go
+6
-6
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
...
@@ -7,6 +7,7 @@ package os
import
(
import
(
"runtime"
"runtime"
"syscall"
"syscall"
"time"
)
)
// File represents an open file descriptor.
// File represents an open file descriptor.
...
@@ -299,15 +300,14 @@ func Chmod(name string, mode FileMode) error {
...
@@ -299,15 +300,14 @@ func Chmod(name string, mode FileMode) error {
// Chtimes changes the access and modification times of the named
// Chtimes changes the access and modification times of the named
// file, similar to the Unix utime() or utimes() functions.
// file, similar to the Unix utime() or utimes() functions.
//
//
// The argument times are in nanoseconds, although the underlying
// The underlying filesystem may truncate or round the values to a
// filesystem may truncate or round the values to a more
// less precise time unit.
// coarse time unit.
func
Chtimes
(
name
string
,
atime
time
.
Time
,
mtime
time
.
Time
)
error
{
func
Chtimes
(
name
string
,
atimeNs
int64
,
mtimeNs
int64
)
error
{
var
d
Dir
var
d
Dir
d
.
Null
()
d
.
Null
()
d
.
Atime
=
uint32
(
atime
Ns
/
1e9
)
d
.
Atime
=
uint32
(
atime
.
Unix
()
)
d
.
Mtime
=
uint32
(
mtime
Ns
/
1e9
)
d
.
Mtime
=
uint32
(
mtime
.
Unix
()
)
if
e
:=
syscall
.
Wstat
(
name
,
pdir
(
nil
,
&
d
));
e
!=
nil
{
if
e
:=
syscall
.
Wstat
(
name
,
pdir
(
nil
,
&
d
));
e
!=
nil
{
return
&
PathError
{
"chtimes"
,
name
,
e
}
return
&
PathError
{
"chtimes"
,
name
,
e
}
...
...
src/pkg/os/stat_plan9.go
View file @
c93ca600
...
@@ -97,3 +97,8 @@ func Stat(name string) (FileInfo, error) {
...
@@ -97,3 +97,8 @@ func Stat(name string) (FileInfo, error) {
func
Lstat
(
name
string
)
(
FileInfo
,
error
)
{
func
Lstat
(
name
string
)
(
FileInfo
,
error
)
{
return
Stat
(
name
)
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