installer(8): Distinguish setting and getting of encryption passphrase
authorAaron LI <aly@aaronly.me>
Sun, 26 Feb 2023 11:59:54 +0000 (19:59 +0800)
committerAaron LI <aly@aaronly.me>
Mon, 27 Feb 2023 12:57:25 +0000 (20:57 +0800)
commit242084fd773a8559267ade92aa9dab50f22aedbf
treeae01a1afafb4fbd43191f0ef0e9594f58729edae
parent3bd7e0a721596bd1a6ad5c4bacdcdb346de94b5c
installer(8): Distinguish setting and getting of encryption passphrase

The installer was using the *same* dialog to set and get the passphrase
for filesystem encryption/decryption, which was confusing and a bit
inconvenience (because the passphrase was required to input twice for
decryption).

The decryption passphrase was get in the following two places:
1. Just after installation and begins to configure the system, the
   passphrase is asked to decrypt and mount the filesystems;
2. Use the LiveCD to "Configure an installed System".

This commit improves the fn_get_passphrase() function to distinguish the
setting and getting of the encryption passphrase.  The dialog of setting
the passphrase remains the same, but the dialog of getting the
passphrase is simplified and doesn't require to confirm the input.

This commit is derived from the patch by tuxillo.

Bug: https://bugs.dragonflybsd.org/issues/3028
usr.sbin/installer/dfuibe_installer/fn.h
usr.sbin/installer/dfuibe_installer/fn_configure.c
usr.sbin/installer/dfuibe_installer/fn_subpart_hammer.c
usr.sbin/installer/dfuibe_installer/fn_subpart_ufs.c