From d1f88c58842256b99cd7afd779f162ada2f8465e Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 3 Mar 2008 11:04:53 +0000 Subject: mini-os: fbfront shouldn't send unsolicited updates Signed-off-by: Samuel Thibault --- extras/mini-os/fbfront.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'extras/mini-os/fbfront.c') diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c index 4f5041ab69..b7caf78f6a 100644 --- a/extras/mini-os/fbfront.c +++ b/extras/mini-os/fbfront.c @@ -245,6 +245,7 @@ struct fbfront_dev { char *nodename; char *backend; + int request_update; char *data; int width; @@ -379,7 +380,7 @@ done: printk("backend at %s\n", dev->backend); { - char path[strlen(dev->backend) + 1 + 6 + 1]; + char path[strlen(dev->backend) + 1 + 14 + 1]; snprintf(path, sizeof(path), "%s/state", dev->backend); @@ -391,6 +392,9 @@ done: xenbus_unwatch_path(XBT_NIL, path); + snprintf(path, sizeof(path), "%s/request-update", dev->backend); + dev->request_update = xenbus_read_integer(path); + err = xenbus_printf(XBT_NIL, nodename, "state", "%u", 4); /* connected */ } @@ -405,6 +409,9 @@ void fbfront_update(struct fbfront_dev *dev, int x, int y, int width, int height uint32_t prod; DEFINE_WAIT(w); + if (dev->request_update <= 0) + return; + if (x < 0) { width += x; x = 0; -- cgit v1.2.3