Skip to content

Commit

Permalink
Add discard flags on open
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Jul 31, 2024
1 parent 7c93fed commit a208853
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/lib/unlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ func LuksUnlock(device, mapper, password string) error {
return err
}
defer dev.Close()

err = dev.FlagsAdd(luks.FlagAllowDiscards)
if err != nil {
return err
}
err = dev.Unlock(0, []byte(password), mapper)
if err != nil {
return err
Expand Down

0 comments on commit a208853

Please sign in to comment.