[PATCH 31/39] win32: add fcntl()

Nguyen Thai Ngoc Duy pclouds at gmail.com
Fri Apr 16 07:10:35 UTC 2010


On Fri, Apr 16, 2010 at 8:59 AM, Nguyen Thai Ngoc Duy <pclouds at gmail.com> wrote:
> On Fri, Apr 16, 2010 at 2:32 AM, Dan Fandrich <dan at coneharvesters.com> wrote:
>> On Thu, Apr 15, 2010 at 10:02:16PM +0200, Nguy�n Thái Ng�c Duy wrote:
>>> +int fcntl(int fd UNUSED_PARAM, int cmd, ...)
>>> +{
>>> +     if (cmd == F_GETFD || cmd == F_SETFD || cmd == F_GETFL)
>>> +             return 0;
>>> +     errno = EINVAL;
>>> +     return -1;
>>> +}
>>
>> Returing 0 makes sense for F_GETFD and F_SETFD, but won't returning 0 be
>> wrong for F_GETFL if some file status flags are set on open?

Gaah... I misread F_SETFD as F_SETFL. Please disregard my reply.
-- 
Duy


More information about the busybox mailing list