summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2011-09-14 12:33:24 +0530
committerAmit Shah <amit.shah@redhat.com>2011-09-14 12:33:24 +0530
commit36f7d69fea4a024bf9b69e7dc44a443660165f83 (patch)
tree856d0388ba9e2a13a9f95b6f5c8dc999503897e7
parent3b9eb5f918c7bcf929f89c293494e5066a81dfba (diff)
downloadtest-virtserial-36f7d69fea4a024bf9b69e7dc44a443660165f83.tar.gz
test-virtserial-36f7d69fea4a024bf9b69e7dc44a443660165f83.tar.xz
test-virtserial-36f7d69fea4a024bf9b69e7dc44a443660165f83.zip
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 <amit.shah@redhat.com>
-rw-r--r--auto-virtserial-guest.c5
-rw-r--r--auto-virtserial.c12
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;