On Sun, Nov 06, 2022 at 06:45:10PM +0000, Klemens Nanni wrote: > On Sat, Oct 22, 2022 at 06:16:34PM +0000, Klemens Nanni wrote: > > Logging the presence of a keydisk the same way offline data chunks are > > reported seems unjustified. > > > > Noting offline chunks serves as warning, so the user can bring them > > online and update bootblocks. > > > > Keydisks, however, are not to be touched by installboot(8) in any case > > and whether they're present/absent or on/offline should make no > > difference to installboot. > > > > So a) drop the "is keydisk - skipping" message and b) hoist the keydisk > > check before the offline check so as to avoid "not online - skipping" > > messages for offline keydisks. > > > > Feedback? Objection? OK? > > Ping. > I plan to commit this in a few days unless I hear objections.
Rebased diff now that this softraid code is MI. Index: softraid.c =================================================================== RCS file: /cvs/src/usr.sbin/installboot/softraid.c,v retrieving revision 1.6 diff -u -p -r1.6 softraid.c --- softraid.c 7 Nov 2022 15:56:09 -0000 1.6 +++ softraid.c 7 Nov 2022 16:04:02 -0000 @@ -126,17 +126,14 @@ sr_open_chunk(int devfd, int vol, int di if (ioctl(devfd, BIOCDISK, bd) == -1) err(1, "BIOCDISK"); + /* Keydisks always have a size of zero. */ + if (bd->bd_size == 0) + return -1; + /* Check disk status. */ if (bd->bd_status != BIOC_SDONLINE && bd->bd_status != BIOC_SDREBUILD) { fprintf(stderr, "softraid chunk %u not online - skipping...\n", - disk); - return -1; - } - - /* Keydisks always have a size of zero. */ - if (bd->bd_size == 0) { - fprintf(stderr, "softraid chunk %u is keydisk - skipping...\n", disk); return -1; }