This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 04/14] Consolidate non cancellable openat call



On 18/08/2017 10:55, Adhemerval Zanella wrote:
> Since this is a refactor, if no one opposes I will commit it shortly.

>> diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
>> index 1587305..f995775 100644
>> --- a/sysdeps/unix/sysv/linux/openat.c
>> +++ b/sysdeps/unix/sysv/linux/openat.c
>> @@ -19,6 +19,7 @@
>>  #include <stdarg.h>
>>  
>>  #include <sysdep-cancel.h>
>> +#include <not-cancel.h>
>>  
>>  #ifndef __OFF_T_MATCHES_OFF64_T
>>  
>> @@ -43,4 +44,23 @@ weak_alias (__libc_openat, __openat)
>>  libc_hidden_weak (__openat)
>>  weak_alias (__libc_openat, openat)
>>  
>> +# if !IS_IN (rtld)
>> +int
>> +__openat_nocancel (int fd, const char *file, int oflag, ...)
>> +{
>> +  mode_t mode = 0;
>> +  if (__OPEN_NEEDS_MODE (oflag))
>> +    {
>> +      va_list arg;
>> +      va_start (arg, oflag);
>> +      mode = va_arg (arg, mode_t);
>> +      va_end (arg);
>> +    }
>> +
>> +  return SYSCALL_CANCEL (openat, fd, file, oflag, mode);

And this is blatantly wrong, I will fix it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]