ia64/xen-unstable

changeset 14218:0d5d7d472024

[PVFB][TOOLS] Terminate backend when frontend vanishes early

Ensure the backend terminates when the frontend vanishes before the
connection is established. This happens when the guest doesn't have
the devices.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
author kfraser@localhost.localdomain
date Fri Mar 02 15:32:42 2007 +0000 (2007-03-02)
parents 145d3c81e654
children 1061c7bff38f
files tools/xenfb/xenfb.c
line diff
     1.1 --- a/tools/xenfb/xenfb.c	Fri Mar 02 15:12:54 2007 +0000
     1.2 +++ b/tools/xenfb/xenfb.c	Fri Mar 02 15:32:42 2007 +0000
     1.3 @@ -245,11 +245,10 @@ static int xenfb_wait_for_state(struct x
     1.4  	unsigned state, dummy;
     1.5  	char **vec;
     1.6  
     1.7 +	awaited |= 1 << XenbusStateUnknown;
     1.8 +
     1.9  	for (;;) {
    1.10  		state = xenfb_read_state(xsh, dir);
    1.11 -		if (state < 0)
    1.12 -			return -1;
    1.13 -
    1.14  		if ((1 << state) & awaited)
    1.15  			return state;
    1.16