Merge pull request #8 from LK4D4/fix_vet_errors

Fix vet errors
This commit is contained in:
Victor Marmol 2014-06-12 11:43:39 -07:00
commit 4fe4e5c298
2 changed files with 5 additions and 4 deletions

View File

@ -31,7 +31,7 @@ func TestGetCgroupParamsInt(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} else if value != floatValue { } else if value != floatValue {
t.Fatalf("Expected %f to equal %f", value, floatValue) t.Fatalf("Expected %d to equal %f", value, floatValue)
} }
// Success with new line. // Success with new line.
@ -43,7 +43,7 @@ func TestGetCgroupParamsInt(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} else if value != floatValue { } else if value != floatValue {
t.Fatalf("Expected %f to equal %f", value, floatValue) t.Fatalf("Expected %d to equal %f", value, floatValue)
} }
// Not a float. // Not a float.

View File

@ -4,17 +4,18 @@ package mount
import ( import (
"fmt" "fmt"
"github.com/dotcloud/docker/pkg/system"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"syscall" "syscall"
"github.com/dotcloud/docker/pkg/system"
) )
func PivotRoot(rootfs string) error { func PivotRoot(rootfs string) error {
pivotDir, err := ioutil.TempDir(rootfs, ".pivot_root") pivotDir, err := ioutil.TempDir(rootfs, ".pivot_root")
if err != nil { if err != nil {
return fmt.Errorf("can't create pivot_root dir %s", pivotDir, err) return fmt.Errorf("can't create pivot_root dir %s, error %v", pivotDir, err)
} }
if err := system.Pivotroot(rootfs, pivotDir); err != nil { if err := system.Pivotroot(rootfs, pivotDir); err != nil {
return fmt.Errorf("pivot_root %s", err) return fmt.Errorf("pivot_root %s", err)