ioemu: Fix interpretation of missing or zero vfb videoram
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 20 May 2008 08:41:52 +0000 (09:41 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 20 May 2008 08:41:52 +0000 (09:41 +0100)
Changeset 17289:d97e61001d81: introduced vfb configuration parameter
videoram, defaulting to zero.  Value zero was interpreted as
unlimited.  Changeset 17630:53195719f762 accidentally dropped the
special case for zero, which broke guests that don't specify videoram,
or specify videoram=0.  Restore the old behavior.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
tools/ioemu/hw/xenfb.c

index d1f34c4562dd50f9cacaeb7f0b72fe72a7c21a95..67bb38cca5a2768b1cf7b247f7cdfa833290a5b9 100644 (file)
@@ -498,7 +498,7 @@ static int xenfb_configure_fb(struct xenfb *xenfb, size_t fb_len_lim,
                        fb_len_lim, fb_len_max);
                fb_len_lim = fb_len_max;
        }
-       if (fb_len > fb_len_lim) {
+       if (fb_len_lim && fb_len > fb_len_lim) {
                fprintf(stderr,
                        "FB: frontend fb size %zu limited to %zu\n",
                        fb_len, fb_len_lim);