From a6ff000ea5138ec22b7ba73cc6ccba698c152328 Mon Sep 17 00:00:00 2001 From: Dong Liu Date: Fri, 11 Aug 2017 16:11:39 +0800 Subject: [PATCH] Clean up diskLooksUnformatted literal --- pkg/util/mount/mount_linux.go | 2 +- pkg/util/mount/mount_unsupported.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/util/mount/mount_linux.go b/pkg/util/mount/mount_linux.go index 84e2e68eeb..cfa1a9d0e7 100644 --- a/pkg/util/mount/mount_linux.go +++ b/pkg/util/mount/mount_linux.go @@ -399,7 +399,7 @@ func (mounter *SafeFormatAndMount) formatAndMount(source string, target string, return mountErr } -// diskLooksUnformatted uses 'lsblk' to see if the given disk is unformated +// getDiskFormat uses 'lsblk' to see if the given disk is unformated func (mounter *SafeFormatAndMount) getDiskFormat(disk string) (string, error) { args := []string{"-n", "-o", "FSTYPE", disk} cmd := mounter.Runner.Command("lsblk", args...) diff --git a/pkg/util/mount/mount_unsupported.go b/pkg/util/mount/mount_unsupported.go index 632ad0606e..8b1e99bc64 100644 --- a/pkg/util/mount/mount_unsupported.go +++ b/pkg/util/mount/mount_unsupported.go @@ -61,7 +61,3 @@ func (mounter *Mounter) PathIsDevice(pathname string) (bool, error) { func (mounter *SafeFormatAndMount) formatAndMount(source string, target string, fstype string, options []string) error { return nil } - -func (mounter *SafeFormatAndMount) diskLooksUnformatted(disk string) (bool, error) { - return true, nil -}