Skip to content

Commit

Permalink
ndctl: Fix building in the absence of keyutils
Browse files Browse the repository at this point in the history
Fix build errors when ndctl is configured without keyutils support.

Fixes: 79728f1 ("ndctl: allow for a 'secure erase' using the master passphrase")
Fixes: 9925be9 ("ndctl: add a load-keys command and a modprobe config")
Signed-off-by: Oliver O'Halloran <[email protected]>
Signed-off-by: Vishal Verma <[email protected]>
  • Loading branch information
oohal authored and stellarhopper committed Feb 5, 2019
1 parent f407a8b commit 8ca46ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ndctl/ndctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ static struct cmd_struct commands[] = {
{ "remove-passphrase", { cmd_remove_passphrase } },
{ "freeze-security", { cmd_freeze_security } },
{ "sanitize-dimm", { cmd_sanitize_dimm } },
#ifdef ENABLE_KEYUTILS
{ "load-keys", { cmd_load_keys } },
#endif
{ "wait-overwrite", { cmd_wait_overwrite } },
{ "list", { cmd_list } },
{ "monitor", { cmd_monitor } },
Expand Down
2 changes: 1 addition & 1 deletion ndctl/util/keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static inline int ndctl_dimm_remove_key(struct ndctl_dimm *dimm)
}

static inline int ndctl_dimm_secure_erase_key(struct ndctl_dimm *dimm,
enum ndctl_key_type key_type);
enum ndctl_key_type key_type)
{
return -EOPNOTSUPP;
}
Expand Down

0 comments on commit 8ca46ad

Please sign in to comment.