Skip to content

Commit

Permalink
Merge pull request #73 from wking/drop-mount-checks
Browse files Browse the repository at this point in the history
validate: Drop mount checks
  • Loading branch information
Mrunal Patel committed May 23, 2016
2 parents a637b56 + db4632b commit 4675b7d
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func bundleValidate(spec rspec.Spec, rootfs string) {
checkSemVer(spec.Version)
checkPlatform(spec.Platform)
checkProcess(spec.Process, rootfs)
checkMounts(spec.Mounts, rootfs)
checkLinux(spec.Linux, rootfs)
}

Expand All @@ -97,17 +96,6 @@ func checkSemVer(version string) {
}
}

func checkMounts(mounts []rspec.Mount, rootfs string) {
for _, mount := range mounts {
destPath := path.Join(rootfs, mount.Destination)
if fi, err := os.Stat(destPath); err != nil {
logrus.Fatalf("Cannot find the mount destination %q", destPath)
} else if !fi.IsDir() {
logrus.Fatalf("Mount destination %q is not a directory.", destPath)
}
}
}

func checkPlatform(platform rspec.Platform) {
validCombins := map[string][]string{
"darwin": {"386", "amd64", "arm", "arm64"},
Expand Down

0 comments on commit 4675b7d

Please sign in to comment.