From ccaf8119986ef54339f1ccab328d65dcb3b1e2dd Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sat, 3 Nov 2018 08:04:52 -0400 Subject: [PATCH] platform/qemu: unexport Disk methods --- platform/machine/qemu/cluster.go | 4 ++-- platform/machine/qemu/disk.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/machine/qemu/cluster.go b/platform/machine/qemu/cluster.go index d42532d3b..f2586f27f 100644 --- a/platform/machine/qemu/cluster.go +++ b/platform/machine/qemu/cluster.go @@ -165,7 +165,7 @@ func (qc *Cluster) NewMachineWithOptions(userdata *conf.UserData, options Machin fdset := 1 for _, disk := range allDisks { - optionsDiskFile, err := disk.SetupFile() + optionsDiskFile, err := disk.setupFile() if err != nil { return nil, err } @@ -175,7 +175,7 @@ func (qc *Cluster) NewMachineWithOptions(userdata *conf.UserData, options Machin id := fmt.Sprintf("d%d", fdnum) qmCmd = append(qmCmd, "-add-fd", fmt.Sprintf("fd=%d,set=%d", fdnum, fdset), "-drive", fmt.Sprintf("if=none,id=%s,format=qcow2,file=/dev/fdset/%d", id, fdset), - "-device", qc.virtio("blk", fmt.Sprintf("drive=%s%s", id, disk.GetOpts()))) + "-device", qc.virtio("blk", fmt.Sprintf("drive=%s%s", id, disk.getOpts()))) fdnum += 1 fdset += 1 } diff --git a/platform/machine/qemu/disk.go b/platform/machine/qemu/disk.go index 04f12f58b..c40ae8fae 100644 --- a/platform/machine/qemu/disk.go +++ b/platform/machine/qemu/disk.go @@ -135,14 +135,14 @@ func MakeDiskTemplate(inputPath, outputPath string) (result error) { return } -func (d Disk) GetOpts() string { +func (d Disk) getOpts() string { if len(d.DeviceOpts) == 0 { return "" } return "," + strings.Join(d.DeviceOpts, ",") } -func (d Disk) SetupFile() (*os.File, error) { +func (d Disk) setupFile() (*os.File, error) { if d.Size == "" && d.BackingFile == "" { return nil, ErrNeedSizeOrFile }