Merge pull request #827 from luoliwoshang/os/stat
[wip] os:correct error of noexist file & os.Error 's nil pointer dereference in linux
This commit is contained in:
@@ -148,7 +148,7 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
|||||||
if ret == 0 {
|
if ret == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return Errno(ret)
|
return Errno(os.Errno)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Stat(path string, stat *Stat_t) (err error) {
|
func Stat(path string, stat *Stat_t) (err error) {
|
||||||
@@ -156,7 +156,7 @@ func Stat(path string, stat *Stat_t) (err error) {
|
|||||||
if ret == 0 {
|
if ret == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return Errno(ret)
|
return Errno(os.Errno)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Pipe(p []int) (err error) {
|
func Pipe(p []int) (err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user