[DTrace-devel] [PATCH 07/10] options: setting procfspath doesn't require a PCB

Nick Alcock nick.alcock at oracle.com
Tue Aug 29 15:48:25 UTC 2023


On 22 Aug 2023, Kris Van Hees said:

> On Wed, Aug 02, 2023 at 02:26:57PM +0100, Nick Alcock via DTrace-devel wrote:
>> /proc is used for all sorts of things these days, not all of which require
>> the compiler to have been running at all.
>
> This commit msg does not match the patch below.  (See more below...)
>
>> Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
>> ---
>>  libdtrace/dt_options.c | 3 ---
>>  1 file changed, 3 deletions(-)
>> 
>> diff --git a/libdtrace/dt_options.c b/libdtrace/dt_options.c
>> index 3631dfe2ee2d..ce7212a1dc12 100644
>> --- a/libdtrace/dt_options.c
>> +++ b/libdtrace/dt_options.c
>> @@ -479,9 +479,6 @@ dt_opt_procfs_path(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
>>  	if (arg == NULL)
>>  		return dt_set_errno(dtp, EDT_BADOPTVAL);
>>  
>> -	if (dtp->dt_pcb != NULL)
>> -		return dt_set_errno(dtp, EDT_BADOPTCTX);
>> -
>
> The commit msg mentions that setting the path to procfs does not require the
> compiler to have been running, yet this conditional actually checks that the
> compiler has *not* been running.  And the error code itself also indicates
> that ("Option cannot be used from within a D program") which disallows setting
> this option from a pragma.

... oh, I totally misread that. OK, the patch is totally wrong, dropped.



More information about the DTrace-devel mailing list