From c13d9199d6a9553108f68403b570838e2aeca8a0 Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Fri, 19 Jan 2024 15:49:52 +0100 Subject: [PATCH 1/3] bash-completion: add missing options to systemd-cryptenroll --- shell-completion/bash/systemd-cryptenroll | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shell-completion/bash/systemd-cryptenroll b/shell-completion/bash/systemd-cryptenroll index 66c6524fe8..1723f75bee 100644 --- a/shell-completion/bash/systemd-cryptenroll +++ b/shell-completion/bash/systemd-cryptenroll @@ -44,7 +44,7 @@ __get_block_devices() { done } -_systemd-cryptenroll() { +_systemd_cryptenroll() { local comps local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword local -A OPTS=( @@ -59,11 +59,14 @@ _systemd-cryptenroll() { --fido2-with-user-presence --fido2-with-user-verification --tpm2-device + --tpm2-device-key + --tpm2-seal-key-handle --tpm2-pcrs --tpm2-public-key --tpm2-public-key-pcrs --tpm2-signature --tpm2-with-pin + --tpm2-pcrlock --wipe-slot' ) @@ -71,7 +74,7 @@ _systemd-cryptenroll() { if __contains_word "$prev" ${OPTS[ARG]}; then case $prev in - --unlock-key-file|--tpm2-public-key|--tpm2-signature) + --unlock-key-file|--tpm2-device-key|--tpm2-public-key|--tpm2-signature|--tpm2-pcrlock) comps=$(compgen -A file -- "$cur") compopt -o filenames ;; @@ -111,4 +114,4 @@ _systemd-cryptenroll() { return 0 } -complete -F _systemd-cryptenroll systemd-cryptenroll +complete -F _systemd_cryptenroll systemd-cryptenroll From 43aaa1b3d36c8ce38441bd24306f2a5cedd8b367 Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Fri, 19 Jan 2024 15:50:15 +0100 Subject: [PATCH 2/3] bash-completion: add missing options to systemd-dissect --- shell-completion/bash/systemd-dissect | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell-completion/bash/systemd-dissect b/shell-completion/bash/systemd-dissect index 4bb203a2f8..17fb6420de 100644 --- a/shell-completion/bash/systemd-dissect +++ b/shell-completion/bash/systemd-dissect @@ -37,6 +37,8 @@ _systemd_dissect() { --in-memory' [ARG]='-m --mount -M -u --umount -U + --attach + --detach -l --list --mtree --with @@ -72,7 +74,7 @@ _systemd_dissect() { if __contains_word "$prev_1" ${OPTS[ARG]}; then case $prev_1 in - -l|--list|--mtree|-m|--mount|-M|-x|--copy-from|-a|--copy-to|--verity-data|--validate|--with) + -l|--list|--mtree|-m|--mount|-M|--attach|--detach|-x|--copy-from|-a|--copy-to|--verity-data|--validate|--with) comps=$(compgen -A file -- "$cur") compopt -o filenames ;; From 08c0b6efd8140a411eda1862ea8c9b4263932341 Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Fri, 19 Jan 2024 16:01:13 +0100 Subject: [PATCH 3/3] dissect: fix typo --- src/dissect/dissect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index dce0209140..f6a8161d40 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -150,7 +150,7 @@ static int help(void) { " -u --umount Unmount the image from the specified directory\n" " -U Shortcut for --umount --rmdir\n" " --attach Attach the disk image to a loopback block device\n" - " --detach Detach a loopback block device gain\n" + " --detach Detach a loopback block device again\n" " -l --list List all the files and directories of the specified\n" " OS image\n" " --mtree Show BSD mtree manifest of OS image\n"