ia64/xen-unstable

changeset 17169:56a7feb9de14

mini-os: fbfront shouldn't send unsolicited updates

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 03 11:04:53 2008 +0000 (2008-03-03)
parents 703afd373e33
children be143a3a90c6
files extras/mini-os/fbfront.c
line diff
     1.1 --- a/extras/mini-os/fbfront.c	Mon Mar 03 11:02:58 2008 +0000
     1.2 +++ b/extras/mini-os/fbfront.c	Mon Mar 03 11:04:53 2008 +0000
     1.3 @@ -245,6 +245,7 @@ struct fbfront_dev {
     1.4  
     1.5      char *nodename;
     1.6      char *backend;
     1.7 +    int request_update;
     1.8  
     1.9      char *data;
    1.10      int width;
    1.11 @@ -379,7 +380,7 @@ done:
    1.12      printk("backend at %s\n", dev->backend);
    1.13  
    1.14      {
    1.15 -        char path[strlen(dev->backend) + 1 + 6 + 1];
    1.16 +        char path[strlen(dev->backend) + 1 + 14 + 1];
    1.17  
    1.18          snprintf(path, sizeof(path), "%s/state", dev->backend);
    1.19  
    1.20 @@ -391,6 +392,9 @@ done:
    1.21  
    1.22          xenbus_unwatch_path(XBT_NIL, path);
    1.23  
    1.24 +        snprintf(path, sizeof(path), "%s/request-update", dev->backend);
    1.25 +        dev->request_update = xenbus_read_integer(path);
    1.26 +
    1.27          err = xenbus_printf(XBT_NIL, nodename, "state", "%u", 4); /* connected */
    1.28      }
    1.29  
    1.30 @@ -405,6 +409,9 @@ void fbfront_update(struct fbfront_dev *
    1.31      uint32_t prod;
    1.32      DEFINE_WAIT(w);
    1.33  
    1.34 +    if (dev->request_update <= 0)
    1.35 +        return;
    1.36 +
    1.37      if (x < 0) {
    1.38          width += x;
    1.39          x = 0;