Re: [PATCH] t1410: fix breakage on case-insensitive filesystems

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

 



Am 14.11.2014 um 22:04 schrieb Andreas Schwab:
> Johannes Sixt <j6t@xxxxxxxx> writes:
> 
>> diff --git a/compat/mingw.c b/compat/mingw.c
>> index 2ee3fe3..fc64b73 100644
>> --- a/compat/mingw.c
>> +++ b/compat/mingw.c
>> @@ -312,7 +312,7 @@ int mingw_open (const char *filename, int oflags, ...)
>>  		return -1;
>>  	fd = _wopen(wfilename, oflags, mode);
>>  
>> -	if (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {
>> +	if (fd < 0 && (oflags & (O_WRONLY|O_RDWR)) && errno == EACCES) {
> 
> O_WRONLY and O_RDWR aren't flags, but two values of a 2-bit field
> (O_ACCMODE).

Hrm... I wondered why O_RDONLY can be zero. If I find O_ACCMODE on
Windows, I'll use it, otherwise, the patch as is will have to do - we
don't have to be particularly portable in this corner of the code.

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]