diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-03-03 11:04:53 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-03-03 11:04:53 +0000 |
commit | d1f88c58842256b99cd7afd779f162ada2f8465e (patch) | |
tree | d0b068ba954c4f28d88f85e98eafc0d344c8c64d /extras/mini-os/fbfront.c | |
parent | 963efcaa388723e7321982a0fe63b89969a9abdb (diff) | |
download | xen-d1f88c58842256b99cd7afd779f162ada2f8465e.tar.gz xen-d1f88c58842256b99cd7afd779f162ada2f8465e.tar.bz2 xen-d1f88c58842256b99cd7afd779f162ada2f8465e.zip |
mini-os: fbfront shouldn't send unsolicited updates
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/fbfront.c')
-rw-r--r-- | extras/mini-os/fbfront.c | 9 |
1 files changed, 8 insertions, 1 deletions
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; |