Update hcsshim to v0.12.0-rc.3
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
This commit is contained in:
25
vendor/github.com/Microsoft/hcsshim/ext4/tar2ext4/tar2ext4.go
generated
vendored
25
vendor/github.com/Microsoft/hcsshim/ext4/tar2ext4/tar2ext4.go
generated
vendored
@@ -18,11 +18,12 @@ import (
|
||||
)
|
||||
|
||||
type params struct {
|
||||
convertWhiteout bool
|
||||
convertBackslash bool
|
||||
appendVhdFooter bool
|
||||
appendDMVerity bool
|
||||
ext4opts []compactext4.Option
|
||||
convertWhiteout bool
|
||||
convertBackslash bool
|
||||
appendVhdFooter bool
|
||||
onlyAppendVhdFooter bool
|
||||
appendDMVerity bool
|
||||
ext4opts []compactext4.Option
|
||||
}
|
||||
|
||||
// Option is the type for optional parameters to Convert.
|
||||
@@ -46,6 +47,12 @@ func AppendVhdFooter(p *params) {
|
||||
p.appendVhdFooter = true
|
||||
}
|
||||
|
||||
// OnlyAppendVhdFooter instructs the converter not to convert but still to add a fixed VHD footer to the
|
||||
// file.
|
||||
func OnlyAppendVhdFooter(p *params) {
|
||||
p.onlyAppendVhdFooter = true
|
||||
}
|
||||
|
||||
// AppendDMVerity instructs the converter to add a dmverity Merkle tree for
|
||||
// the ext4 filesystem after the filesystem and before the optional VHD footer
|
||||
func AppendDMVerity(p *params) {
|
||||
@@ -201,6 +208,14 @@ func Convert(r io.Reader, w io.ReadWriteSeeker, options ...Option) error {
|
||||
opt(&p)
|
||||
}
|
||||
|
||||
if p.onlyAppendVhdFooter {
|
||||
_, err := io.Copy(w, r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ConvertToVhd(w)
|
||||
}
|
||||
|
||||
if err := ConvertTarToExt4(r, w, options...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user