1
0
mirror of https://github.com/kairos-io/kcrypt.git synced 2025-05-08 16:28:04 +00:00
Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
Itxaka 2025-04-16 15:39:06 +02:00
parent 3d9999b170
commit faf0b097ea
No known key found for this signature in database
GPG Key ID: FF934753A9D6AC56
2 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ func main() {
Value: []string{"11"},
},
},
Action: func(ctx context.Context, c *cli.Command) error {
Action: func(_ context.Context, c *cli.Command) error {
if c.NArg() != 1 {
return fmt.Errorf("requires 1 arg, the partition label")
}
@ -73,7 +73,7 @@ func main() {
Usage: "Use TPM to unlock the partition",
},
},
Action: func(ctx context.Context, c *cli.Command) error {
Action: func(_ context.Context, c *cli.Command) error {
return lib.UnlockAllWithLogger(c.Bool("tpm"), log)
},
},
@ -83,7 +83,7 @@ func main() {
Usage: "Prints the version",
Description: "Prints the version",
ArgsUsage: "kcrypt version",
Action: func(ctx context.Context, c *cli.Command) error {
Action: func(_ context.Context, c *cli.Command) error {
log.Logger.Info().Str("commit", GitCommit).Str("goversion", runtime.Version()).Str("version", Version).Msg("Kcrypt")
return nil
},

View File

@ -73,7 +73,7 @@ func UnlockAllWithLogger(tpm bool, log types.KairosLogger) error {
func UnlockDisk(b *block.Partition) error {
pass, err := GetPassword(b)
if err != nil {
return fmt.Errorf("error retriving password remotely: %w", err)
return fmt.Errorf("error retrieving password remotely: %w", err)
}
return LuksUnlock(filepath.Join("/dev", b.Name), b.Name, pass)