From: YASUOKA Masahiko Subject: Re: Close the existing keydisk.img. To: takeasou.masato@gmail.com Cc: tech@openbsd.org Date: Mon, 16 Feb 2026 11:59:24 +0900 On Mon, 16 Feb 2026 11:31:06 +0900 (JST) YASUOKA Masahiko wrote: > On Mon, 16 Feb 2026 09:15:42 +0900 > ASOU Masato wrote: >> I modified the patch. >> I've attach the patch because it changes tabs to space. > > Let me put the diff inline. > > diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c > index 6e24f2ff4f5..170b573f97d 100644 > --- a/sys/dev/softraid_crypto.c > +++ b/sys/dev/softraid_crypto.c > @@ -837,7 +837,7 @@ sr_crypto_read_key_disk(struct sr_discipline *sd, struct sr_crypto *mdd_crypto, > vput(vn); > goto done; > } > - open = 1; /* close dev on error */ > + open = 1; > > /* Get partition details. */ > label = malloc(sizeof(*label), M_DEVBUF, M_WAITOK); I suggested the comment should be kept in previous mail. (Because "close dev on error" is still true even if the diff is to close dev on the non-error case at the end as well.) > @@ -878,7 +878,6 @@ sr_crypto_read_key_disk(struct sr_discipline *sd, struct sr_crypto *mdd_crypto, > /* Construct key disk chunk. */ > key_disk = malloc(sizeof(struct sr_chunk), M_DEVBUF, M_WAITOK | M_ZERO); > key_disk->src_dev_mm = dev; > - key_disk->src_vn = vn; > key_disk->src_size = 0; > > memcpy(&key_disk->src_meta, (struct sr_meta_chunk *)(sm + 1), > > @@ -900,8 +899,7 @@ sr_crypto_read_key_disk(struct sr_discipline *sd, struct sr_crypto *mdd_crypto, > } > } > > - open = 0; > - > + /* keep `open = 1' to close dev */ There is an extra space at the beginning of the line. > done: > for (omi = SLIST_FIRST(&som); omi != NULL; omi = omi_next) { > omi_next = SLIST_NEXT(omi, omi_link); >