[DTrace-devel] [PATCH 1/5] Implement setopt()
Nick Alcock
nick.alcock at oracle.com
Thu Sep 8 17:59:46 UTC 2022
On 7 Sep 2022, Kris Van Hees stated:
> On Wed, Sep 07, 2022 at 04:13:41PM +0100, Nick Alcock wrote:
>> > The setopt machinery expects the option name and value to be strings. So the
>> > size of the value (which is described in vrec) will be > sizeof(uint64_t) if
>> > there is a value passed,
>>
>> Really? "a" is < sizeof(uint64_t). So is "foo" for that matter. This
>> seems like an... unreliable way to detect if a value was passed.
>>
>> I feel like I'm missing something obvious :)
>
> We are dealing with DTrace strings, remember? And those are fixed size.
> This is really the way it was done in v1 also.
Oh yeah, of course, I keep forgetting that :/ hope springs eternal I
suppose.
Makes sense, then. With a comment explaining that:
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>
--
NULL && (void)
More information about the DTrace-devel
mailing list