</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--list-devices</option></term>
+
+ <listitem><para>Show a list of candidate block devices this command may operate on. Specifically,
+ this enumerates block devices currently present that contain a LUKS superblock, and shows their device
+ node paths along with any of their symlinks.</para>
+
+ <xi:include href="version-info.xml" xpointer="v257"/></listitem>
+ </varlistentry>
+
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
</variablelist>
#include <sys/mman.h>
#include "ask-password-api.h"
+#include "blockdev-list.h"
#include "blockdev-util.h"
#include "build.h"
#include "cryptenroll-fido2.h"
"%5$sEnroll a security token or authentication credential to a LUKS volume.%6$s\n\n"
" -h --help Show this help\n"
" --version Show package version\n"
+ " --list-devices List candidate block devices to operate on\n"
" --wipe-slot=SLOT1,SLOT2,…\n"
" Wipe specified slots\n"
"\n%3$sUnlocking:%4$s\n"
ARG_FIDO2_WITH_UP,
ARG_FIDO2_WITH_UV,
ARG_FIDO2_CRED_ALG,
+ ARG_LIST_DEVICES,
};
static const struct option options[] = {
{ "tpm2-pcrlock", required_argument, NULL, ARG_TPM2_PCRLOCK },
{ "tpm2-with-pin", required_argument, NULL, ARG_TPM2_WITH_PIN },
{ "wipe-slot", required_argument, NULL, ARG_WIPE_SLOT },
+ { "list-devices", no_argument, NULL, ARG_LIST_DEVICES },
{}
};
break;
}
+ case ARG_LIST_DEVICES:
+ r = blockdev_list(BLOCKDEV_LIST_SHOW_SYMLINKS|BLOCKDEV_LIST_REQUIRE_LUKS);
+ if (r < 0)
+ return r;
+
+ return 0;
+
case '?':
return -EINVAL;