rem: descriptor->pos = pos + length;
add: pos += vecs[i].iov_len;
context: _user_writev(int fd, off_t pos, const iovec *userVecs, size_t count){	struct file_descriptor *descriptor;	ssize_t bytesWritten = 0;	status_t status;	iovec *vecs;	uint32 i;	/* This is a user_function, so abort if we have a kernel address */	if (!IS_USER_ADDRESS(userVecs))		return B_BAD_ADDRESS;	descriptor = get_fd(get_current_io_context(false), fd);	if (!descriptor)		return B_FILE_ERROR;	if ((descriptor->open_mode & O_RWMASK) == O_RDONLY) {		status = B_FILE_ERROR;		goto err1;	}	vecs = malloc(sizeof(iovec) * count);	if (vecs == NULL) {		status = B_NO_MEMORY;		goto err1;	}	if (user_memcpy(vecs, userVecs, sizeof(iovec) * count) < B_OK) {		status = B_BAD_ADDRESS;		goto err2;	}	if (pos == -1)		pos = descriptor->pos;	if (descriptor->ops->fd_write) {		for (i = 0; i < count; i++) {			size_t length = vecs[i].iov_len;			status = descriptor->ops->fd_write(descriptor, pos, vecs[i].iov_base, &length);			if (status < B_OK) {				bytesWritten = status;				break;			}			if ((uint32)bytesWritten + length > SSIZE_MAX)				bytesWritten = SSIZE_MAX;			else				bytesWritten += (ssize_t)length;			descriptor->pos = pos + length;		}	} else		bytesWritten = B_BAD_VALUE;	status = bytesWritten;err2:	free(vecs);err1:	put_fd(descriptor);	return status;}