Extract mknod, umask, lstat to pkg/system

Some parts of pkg/archive is called on both client/daemon code. To get
it compiling on Windows, these funcs are extracted into files with
build tags.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
This commit is contained in:
Ahmet Alp Balkan 2014-11-13 12:00:04 -08:00
parent 91ea04eea7
commit 515e7481de
9 changed files with 89 additions and 9 deletions

16
system/lstat.go Normal file
View file

@ -0,0 +1,16 @@
// +build !windows
package system
import (
"syscall"
)
func Lstat(path string) (*syscall.Stat_t, error) {
s := &syscall.Stat_t{}
err := syscall.Lstat(path, s)
if err != nil {
return nil, err
}
return s, nil
}