mirror of
https://github.com/kairos-io/kcrypt.git
synced 2025-09-01 15:08:10 +00:00
Add functions to produce a string representation of a partition
so that we encapsulate all the logic in the same package Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
4
main.go
4
main.go
@@ -17,6 +17,8 @@ import (
|
||||
"github.com/mudler/go-pluggable"
|
||||
cp "github.com/otiai10/copy"
|
||||
"github.com/urfave/cli"
|
||||
|
||||
pi "github.com/kairos-io/kcrypt/pkg/partition_info"
|
||||
)
|
||||
|
||||
func waitdevice(device string, attempts int) error {
|
||||
@@ -152,7 +154,7 @@ func luksify(label string) (string, error) {
|
||||
return "", fmt.Errorf("err: %w, out: %s", err, out2)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s:%s:%s", b.Label, b.Name, b.UUID), nil
|
||||
return pi.PartitionToString(b), nil
|
||||
}
|
||||
|
||||
func findPartition(label string) (string, *block.Partition, error) {
|
||||
|
Reference in New Issue
Block a user