[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH] lib/vfscore: stat() - Return EINVAL if pathname is NULL



Hi Sharan,

Thanks for looking into this. Please see inline.

On 8/21/19 7:12 PM, Sharan Santhanam wrote:
> Hello Costin,
> 
> Please find the review comment inline.
> 
> Thanks & Regards
> 
> Sharan
> 
> On 8/21/19 3:50 PM, Costin Lupu wrote:
>> Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
>> ---
>>   lib/vfscore/main.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
>> index fff233f3..f8692322 100644
>> --- a/lib/vfscore/main.c
>> +++ b/lib/vfscore/main.c
>> @@ -1141,6 +1141,8 @@ LFS64(__xstat);
>>     int stat(const char *pathname, struct stat *st)
>>   {
>> +    if (!pathname)
>> +        return EINVAL;
> Shouldn't errno set to EINVAL and return -1.

Agreed, but since we're on it, would it be better to move this change to
path_conv() or is it fine here in stat()?

>>       return __xstat(1, pathname, st);
>>   }
>>   
> 
> _______________________________________________
> Minios-devel mailing list
> Minios-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/minios-devel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.