Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 2b88074b in mainline for uspace/srv/vfs/vfs.c


Ignore:
Timestamp:
2009-10-29T22:06:46Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
2e983c7
Parents:
14ecd6c
Message:

vfs: file descriptors housekeeping changes

  • add support for allocating new file descriptors from the end of the fd range (O_DESC)
  • add support for assigning of an already opened file to a free file descriptor

vfs: VFS_OUT_CLOSE is called only when the file reference count is about to drop to zero
vfs: implement VFS_IN_DUP

libc: optimize current working directory housekeeping

  • using opendir() was an overkill
  • allocate current working directory file descriptor from the end of the fd range using O_DESC (so it doesn't mess with the well-known descriptors 0, 1 and 2)

libc: implement dup2() (via VFS_IN_DUP)

getvc: change stdin/stdout/stderr by a slightly more elegant way (using dup2())

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs.c

    r14ecd6c r2b88074b  
    126126                        vfs_sync(callid, &call);
    127127                        break;
     128                case VFS_IN_DUP:
     129                        vfs_dup(callid, &call);
    128130                default:
    129131                        ipc_answer_0(callid, ENOTSUP);
Note: See TracChangeset for help on using the changeset viewer.