Skip to content

Commit 20218a6

Browse files
committed
driverutil: s/diffDisk/srcDisk/ to avoid confusion
Follow up to PR 4421 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1 parent 77d181a commit 20218a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/driverutil/disk.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ func EnsureDisk(ctx context.Context, instDir, diskSize string, diskImageFormat i
3838
if err != nil {
3939
return err
4040
}
41-
destDisk := baseDisk
41+
srcDisk := baseDisk
4242
if isBaseDiskISO {
43-
destDisk = diffDisk
43+
srcDisk = diffDisk
4444

4545
// Create an empty data volume for the diff disk
4646
diffDiskF, err := os.Create(diffDisk)
@@ -54,8 +54,8 @@ func EnsureDisk(ctx context.Context, instDir, diskSize string, diskImageFormat i
5454
}
5555
// Check whether to use ASIF format
5656

57-
if err = diskUtil.Convert(ctx, diskImageFormat, destDisk, diffDisk, &diskSizeInBytes, false); err != nil {
58-
return fmt.Errorf("failed to convert %q to a disk %q: %w", baseDisk, diffDisk, err)
57+
if err = diskUtil.Convert(ctx, diskImageFormat, srcDisk, diffDisk, &diskSizeInBytes, false); err != nil {
58+
return fmt.Errorf("failed to convert %q to a disk %q: %w", srcDisk, diffDisk, err)
5959
}
6060
return err
6161
}

0 commit comments

Comments
 (0)