disk: fix Payload cloning bugs
In LUKSContainer and LVMLogicalVolume we neglected to clone the Payload which means we would modify the base PartitionTable when manipulating the clone.
This commit is contained in:
parent
e921b7aadd
commit
10095e382a
2 changed files with 2 additions and 2 deletions
|
|
@ -61,7 +61,7 @@ func (lc *LUKSContainer) Clone() Entity {
|
|||
Memory: lc.PBKDF.Memory,
|
||||
Parallelism: lc.PBKDF.Parallelism,
|
||||
},
|
||||
Payload: lc.Payload,
|
||||
Payload: lc.Payload.Clone(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ func (lv *LVMLogicalVolume) Clone() Entity {
|
|||
return &LVMLogicalVolume{
|
||||
Name: lv.Name,
|
||||
Size: lv.Size,
|
||||
Payload: lv.Payload,
|
||||
Payload: lv.Payload.Clone(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue