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

From: Demi Marie Obenour

Date: Sun May 17 2026 - 16:25:58 EST


On 5/17/26 05:58, Miguel Ojeda wrote:
> 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.)

I was hoping for Linux to avoid the Rust trend of downloading tons
of third-party crates, with all the supply-chain risks that entails.
Hence the idea of using getopt and system C libraries.
--
Sincerely,
Demi Marie Obenour (she/her/hers)

Attachment: OpenPGP_0xB288B55FFF9C22C1.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature