mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove all darwin specific files and use more generic _unsupported with build tags.
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
This commit is contained in:
parent
9481afa617
commit
45dd051e8e
10 changed files with 14 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
// +build: !linux !amd64
|
||||||
package archive
|
package archive
|
||||||
|
|
||||||
import "syscall"
|
import "syscall"
|
|
@ -1,3 +1,4 @@
|
||||||
|
// +build: !linux !amd64
|
||||||
package lxc
|
package lxc
|
||||||
|
|
||||||
func setHostname(hostname string) error {
|
func setHostname(hostname string) error {
|
|
@ -1,3 +1,4 @@
|
||||||
|
// +build: !linux !amd64
|
||||||
package aufs
|
package aufs
|
||||||
|
|
||||||
import "errors"
|
import "errors"
|
|
@ -1,3 +1,3 @@
|
||||||
// +build !linux
|
// +build !linux !amd64
|
||||||
|
|
||||||
package btrfs
|
package btrfs
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// +build: !linux !amd64
|
||||||
package mount
|
package mount
|
||||||
|
|
||||||
func parseOptions(options string) (int, string) {
|
func parseOptions(options string) (int, string) {
|
|
@ -1,3 +1,4 @@
|
||||||
|
// +build: !linux !amd64
|
||||||
package mount
|
package mount
|
||||||
|
|
||||||
func mount(device, target, mType string, flag uintptr, data string) error {
|
func mount(device, target, mType string, flag uintptr, data string) error {
|
|
@ -1,3 +1,4 @@
|
||||||
|
// +build: !linux !amd64
|
||||||
package netlink
|
package netlink
|
||||||
|
|
||||||
import (
|
import (
|
|
@ -1,3 +1,4 @@
|
||||||
|
// +build: !linux !amd64
|
||||||
package docker
|
package docker
|
||||||
|
|
||||||
import (
|
import (
|
|
@ -24,10 +24,12 @@ func TreeSize(dir string) (size int64, err error) {
|
||||||
|
|
||||||
// Check inode to handle hard links correctly
|
// Check inode to handle hard links correctly
|
||||||
inode := fileInfo.Sys().(*syscall.Stat_t).Ino
|
inode := fileInfo.Sys().(*syscall.Stat_t).Ino
|
||||||
if _, exists := data[inode]; exists {
|
// inode is not a uint64 on all platforms. Cast it to avoid issues.
|
||||||
|
if _, exists := data[uint64(inode)]; exists {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
data[inode] = false
|
// inode is not a uint64 on all platforms. Cast it to avoid issues.
|
||||||
|
data[uint64(inode)] = false
|
||||||
|
|
||||||
size += s
|
size += s
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// +build: !linux !amd64
|
||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -9,5 +10,5 @@ type Utsname struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func uname() (*Utsname, error) {
|
func uname() (*Utsname, error) {
|
||||||
return nil, errors.New("Kernel version detection is not available on darwin")
|
return nil, errors.New("Kernel version detection is available only on linux")
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue