Skip to content

Commit

Permalink
Always ready for writes
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Jan 20, 2024
1 parent 6841e7f commit b893255
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,9 @@ BOOL virtio_console_can_write_data(VIRTIODevice *s)

int virtio_console_get_write_len(VIRTIODevice *s)
{
//// Normally virtio_console_get_write_len returns 0 until VM Guest connects to VirtIO.
return 32; //// Now we're always ready for writes.
#ifdef NOTUSED
//puts("virtio_console_get_write_len");////
int queue_idx = 0;
QueueState *qs = &s->queue[queue_idx];
Expand All @@ -1320,6 +1323,7 @@ int virtio_console_get_write_len(VIRTIODevice *s)
if (get_desc_rw_size(s, &read_size, &write_size, queue_idx, desc_idx))
return 0;
return write_size;
#endif // NOTUSED
}

int virtio_console_write_data(VIRTIODevice *s, const uint8_t *buf, int buf_len)
Expand Down

0 comments on commit b893255

Please sign in to comment.