From 36f7d69fea4a024bf9b69e7dc44a443660165f83 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Wed, 14 Sep 2011 12:33:24 +0530 Subject: auto-virtserial: Don't send OK message to guest The guest doesn't do anything with the first STATUS_OK message we send; we anyway depend on the guest to contact us when it's up and running. This worked OK so far, but with newer kernels, the guest actually is up and running and sees this message from us, putting it in a confused state. Just don't send any message. Signed-off-by: Amit Shah --- auto-virtserial-guest.c | 5 ----- auto-virtserial.c | 12 ++---------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/auto-virtserial-guest.c b/auto-virtserial-guest.c index 52efbe2..9146c43 100644 --- a/auto-virtserial-guest.c +++ b/auto-virtserial-guest.c @@ -643,11 +643,6 @@ back_to_open: goto back_to_open; } switch(gpkt.key) { - /* case KEY_STATUS_OK: */ - /* gpkt.key = KEY_STATUS_OK; */ - /* gpkt.value = 1; */ - /* write(cfd, &gpkt, sizeof(gpkt)); */ - /* break; */ case KEY_OPEN: ret = open_port(gpkt.value); send_report(cfd, ret); diff --git a/auto-virtserial.c b/auto-virtserial.c index 43daf3d..c406d4f 100644 --- a/auto-virtserial.c +++ b/auto-virtserial.c @@ -1788,16 +1788,8 @@ int main(int argc, const char *argv[]) sleep(20); goto next; } - /* - * Send a message to the guest indicating we're ready. If the - * guest isn't ready yet, it'll connect and let us know. - */ - gpkt.key = KEY_STATUS_OK; - gpkt.value = 1; - ret = write(chardevs[1].sock, &gpkt, sizeof(gpkt)); - if (ret == -1) - error(errno, errno, "write %s", chardevs[1].path); - /* Now wait till we receive guest's response */ + + /* Now wait till we receive the first message from the guest. */ pollfd[0].fd = chardevs[1].sock; pollfd[0].events = POLLIN; -- cgit