Added support for F_GETFL and F_SETFL.

This commit is contained in:
Joel Sherrill
1999-03-08 21:38:56 +00:00
parent 550b6da660
commit 1bb170208b
3 changed files with 9 additions and 6 deletions

View File

@@ -95,13 +95,14 @@ int fcntl(
* XXX man page, only these flags can be added.
*/
flags &= ~(O_APPEND | O_NONBLOCK);
flags = (iop->flags & ~(O_APPEND|O_NONBLOCK)) |
(flags & (O_APPEND|O_NONBLOCK));
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags |= flags;
iop->flags = flags;
return 0;
case F_GETLK:

View File

@@ -95,13 +95,14 @@ int fcntl(
* XXX man page, only these flags can be added.
*/
flags &= ~(O_APPEND | O_NONBLOCK);
flags = (iop->flags & ~(O_APPEND|O_NONBLOCK)) |
(flags & (O_APPEND|O_NONBLOCK));
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags |= flags;
iop->flags = flags;
return 0;
case F_GETLK: