mirror of
https://github.com/kairos-io/kcrypt.git
synced 2025-09-12 13:23:57 +00:00
Update partition label with the store one before asking for a passphrase
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
@@ -38,6 +38,16 @@ func (pi PartitionInfo) LookupUUIDForLabel(l string) string {
|
||||
return pi.mapping[l]
|
||||
}
|
||||
|
||||
func (pi PartitionInfo) LookupLabelForUUID(uuid string) string {
|
||||
for k, v := range pi.mapping {
|
||||
if v == uuid {
|
||||
return k
|
||||
}
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
// UpdatePartitionLabelMapping takes partition information as a string argument
|
||||
// the the form: `label:name:uuid` (that's what the `kcrypt encrypt` command returns
|
||||
// on success. This function stores it in the PartitionInfoFile yaml file for
|
||||
|
Reference in New Issue
Block a user