add: FUNCTION(("vfs_dup2: ofd = %d, nfd = %d\n", ofd, nfd));
context: vfs_dup2(int ofd, int nfd, bool kernel){	struct io_context *curr_ioctx;	struct file_descriptor *evicted;	int rc;#if MAKE_NOIZE	dprintf("vfs_dup2: ofd=%d nfd=%d\n", ofd, nfd);#endif	// quick check	if ((ofd < 0) || (nfd < 0)) {		rc = ERR_INVALID_HANDLE;		goto err;	}	// Get current io context and lock	curr_ioctx = get_current_io_context(kernel);	mutex_lock(&curr_ioctx->io_mutex);	// Check for upper boundary, we do in the locked part	// because in the future the fd table might be resizeable	if ((ofd >= curr_ioctx->table_size) || !curr_ioctx->fds[ofd]) {		rc = ERR_INVALID_HANDLE;		goto err_1;	}	if ((nfd >= curr_ioctx->table_size)) {		rc = ERR_INVALID_HANDLE;		goto err_1;	}	// Check for identity, note that it cannot be made above	// because we always want to return an error on invalid	// handles	if (ofd == nfd)		// ToDo: this is buggy and doesn't unlock the io mutex!		goto success;	// Now do the work	evicted = curr_ioctx->fds[nfd];	curr_ioctx->fds[nfd] = curr_ioctx->fds[ofd];	atomic_add(&curr_ioctx->fds[ofd]->ref_count, 1);	// Unlock the ioctx	mutex_unlock(&curr_ioctx->io_mutex);	// Say bye bye to the evicted fd	if (evicted)		put_fd(evicted);success:	rc = nfd;	return nfd;err_1:	mutex_unlock(&curr_ioctx->io_mutex);err:	return rc;}