Re: [RFC PATCH v3 1/3] scripts: add kconfirm

From: Miguel Ojeda

Date: Sun May 17 2026 - 05:58:45 EST


On Sun, May 17, 2026 at 8:10 AM Demi Marie Obenour
<demiobenour@xxxxxxxxx> wrote:
>
> I think it is simpler to just inline all of this code into its
> single call-site. The safety of the code is obvious in context,
> and you can avoid checking for impossible errors. For instance,
> since all of the options have required arguments, it really is safe
> to dereference optarg without any null check.

If we are going to have unsafe code, then let's please build safe
abstractions wherever possible, just like we do elsewhere. We should
also write `// SAFETY` comments and enable the lints that catch that
etc., just like elsewhere too.

(This is not to say we should use `getopt` instead of something like
`clap` -- as soon as we start using `cargo vendor`, then it makes
sense to at least consider having a set of vetted, well-known crates
to write Rust tools in-tree, as I mentioned in v1.)

Cheers,
Miguel