mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
update vendor
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ type SectorReadError struct {
|
||||
// Error returns the string representation of the SectorReadError instance.
|
||||
//
|
||||
func (e *SectorReadError) Error() string {
|
||||
return fmt.Sprint("Read sector '%d' of block '%d' failed: %s", e.SectorIndex, e.BlockIndex, e.err)
|
||||
return fmt.Sprintf("Read sector '%d' of block '%d' failed: %s", e.SectorIndex, e.BlockIndex, e.err)
|
||||
}
|
||||
|
||||
// NewSectorReadError returns a new SectorReadError instance.
|
||||
|
||||
+3
-3
@@ -19,8 +19,8 @@ type DiskStream struct {
|
||||
offset int64
|
||||
size int64
|
||||
isClosed bool
|
||||
vhdFactory *vhdFile.FileFactory
|
||||
vhdFile *vhdFile.VhdFile
|
||||
vhdFactory *vhdfile.FileFactory
|
||||
vhdFile *vhdfile.VhdFile
|
||||
vhdBlockFactory block.Factory
|
||||
vhdFooterRange *common.IndexRange
|
||||
vhdDataRange *common.IndexRange
|
||||
@@ -39,7 +39,7 @@ type StreamExtent struct {
|
||||
func CreateNewDiskStream(vhdPath string) (*DiskStream, error) {
|
||||
var err error
|
||||
stream := &DiskStream{offset: 0, isClosed: false}
|
||||
stream.vhdFactory = &vhdFile.FileFactory{}
|
||||
stream.vhdFactory = &vhdfile.FileFactory{}
|
||||
if stream.vhdFile, err = stream.vhdFactory.Create(vhdPath); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,5 +35,5 @@ func (v VhdFeature) String() string {
|
||||
return "Reserved"
|
||||
}
|
||||
|
||||
return fmt.Sprint("%d", v)
|
||||
return fmt.Sprintf("%d", v)
|
||||
}
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -55,5 +55,5 @@ func (p PlatformCode) String() string {
|
||||
return "MacX"
|
||||
}
|
||||
|
||||
return fmt.Sprint("%d", p)
|
||||
return fmt.Sprintf("%d", p)
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ const oneTB int64 = 1024 * 1024 * 1024 * 1024
|
||||
// ValidateVhd returns error if the vhdPath refer to invalid vhd.
|
||||
//
|
||||
func ValidateVhd(vhdPath string) error {
|
||||
vFactory := &vhdFile.FileFactory{}
|
||||
vFactory := &vhdfile.FileFactory{}
|
||||
_, err := vFactory.Create(vhdPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s is not a valid VHD: %v", vhdPath, err)
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
package vhdFile
|
||||
package vhdfile
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -16,7 +16,8 @@ type VhdFile struct {
|
||||
// Footer represents the disk's footer.
|
||||
Footer *footer.Footer
|
||||
// Header represents the disk's header, this field is nil for fixed VHD.
|
||||
// Only Dynamic and Differencing disk has header.
|
||||
// Only Dynamic and Differencing disk has header.make
|
||||
|
||||
Header *header.Header
|
||||
// BlockAllocationTable represents the table holding absolute offset to the first sector
|
||||
// of blocks in the disk. Only Dynamic and Differencing disk has BAT.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package vhdFile
|
||||
package vhdfile
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
Reference in New Issue
Block a user