Revert "Kludge: work around lack of syscall.seek on 386 and arm, #1906"

This reverts commit 60b483bd3b.
This commit is contained in:
Dan Kegel
2022-01-22 19:08:58 +00:00
committed by Ron Evans
parent cd867b72b9
commit ee663ccb96
5 changed files with 27 additions and 84 deletions
+14
View File
@@ -15,6 +15,20 @@ func (f *File) Sync() error {
return ErrNotImplemented
}
// Stat returns the FileInfo structure describing file.
// If there is an error, it will be of type *PathError.
func (f *File) Stat() (FileInfo, error) {
var fs fileStat
err := ignoringEINTR(func() error {
return syscall.Fstat(int(f.handle.(unixFileHandle)), &fs.sys)
})
if err != nil {
return nil, &PathError{Op: "fstat", Path: f.name, Err: err}
}
fillFileStatFromSys(&fs, f.name)
return &fs, nil
}
// statNolog stats a file with no test logging.
func statNolog(name string) (FileInfo, error) {
var fs fileStat