From 0c2c75b12ad1b3480113f66ada8c26dd8722a958 Mon Sep 17 00:00:00 2001 From: LK4D4 Date: Thu, 12 Jun 2014 09:52:31 +0400 Subject: [PATCH] Fix vet errors Docker-DCO-1.1-Signed-off-by: Alexandr Morozov (github: LK4D4) --- cgroups/fs/utils_test.go | 4 ++-- mount/pivotroot.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cgroups/fs/utils_test.go b/cgroups/fs/utils_test.go index 4dd2243e..63d743f0 100644 --- a/cgroups/fs/utils_test.go +++ b/cgroups/fs/utils_test.go @@ -31,7 +31,7 @@ func TestGetCgroupParamsInt(t *testing.T) { if err != nil { t.Fatal(err) } 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. @@ -43,7 +43,7 @@ func TestGetCgroupParamsInt(t *testing.T) { if err != nil { t.Fatal(err) } 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. diff --git a/mount/pivotroot.go b/mount/pivotroot.go index 447f5904..ffd60513 100644 --- a/mount/pivotroot.go +++ b/mount/pivotroot.go @@ -4,17 +4,18 @@ package mount import ( "fmt" - "github.com/dotcloud/docker/pkg/system" "io/ioutil" "os" "path/filepath" "syscall" + + "github.com/dotcloud/docker/pkg/system" ) func PivotRoot(rootfs string) error { pivotDir, err := ioutil.TempDir(rootfs, ".pivot_root") 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 { return fmt.Errorf("pivot_root %s", err)