> Right. You add O_DIRECTORY to that check. Ah, I misunderstood. My apologies.
> if ((flags & (FREAD|FWRITE)) == 0 && (flags & O_DIRECTORY) == 0) > return EINVAL; > if ((flags & O_DIRECTORY) != 0 && (flags & (FREAD|FWRITE)) != 0) > return EINVAL; Actually, what I have now skips the latter of those two checks, because I can't see any reason wby O_DIRECTORY shouldn't be specifiable with, eg, O_RDONLY. Am I missing something important there? After how I missed something pretty blatantly obvious before, I don't trust myself tonight. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B