336 |
|
|
337 |
flags = O_RDWR|O_EXEC; |
flags = O_RDWR|O_EXEC; |
338 |
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0); |
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0); |
339 |
if (file == MACH_PORT_NULL && errno == EACCES) |
if (file == MACH_PORT_NULL && (errno == EACCES |
340 |
|
|| errno == EROFS || errno == EISDIR)) |
341 |
{ |
{ |
342 |
flags = O_RDWR; |
flags = O_RDWR; |
343 |
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0); |
file = file_name_lookup_under (dirfile, name, flags | O_NOLINK, 0); |