ia64/xen-unstable

changeset 10777:a61fd84125aa

Fix domid range check in xenmon.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Jul 25 11:53:29 2006 +0100 (2006-07-25)
parents 849b8ce387c3
children b8b7c278ca4c
files tools/xenmon/xenbaked.c
line diff
     1.1 --- a/tools/xenmon/xenbaked.c	Tue Jul 25 11:41:45 2006 +0100
     1.2 +++ b/tools/xenmon/xenbaked.c	Tue Jul 25 11:53:29 2006 +0100
     1.3 @@ -766,11 +766,9 @@ int indexof(int domid)
     1.4    int xc_handle, ndomains;
     1.5    extern void qos_kill_thread(int domid);
     1.6    
     1.7 -  if (domid < 0 || domid >= NDOMAINS) {	// shouldn't happen
     1.8 -    if (domid != IDLE_DOMAIN_ID) {
     1.9 -      printf("bad domain id: %d\r\n", domid);
    1.10 -      return 0;
    1.11 -    }
    1.12 +  if (domid < 0) {	// shouldn't happen
    1.13 +    printf("bad domain id: %d\r\n", domid);
    1.14 +    return 0;
    1.15    }
    1.16  
    1.17    for (idx=0; idx<NDOMAINS; idx++)