ia64/xen-unstable

changeset 17377:d48551c66377

stubdom: warn about disabled features

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Apr 02 15:46:52 2008 +0100 (2008-04-02)
parents 6c83e17c6e89
children a7181b2f7d44
files tools/ioemu/vl.c tools/ioemu/xenstore.c
line diff
     1.1 --- a/tools/ioemu/vl.c	Wed Apr 02 15:32:13 2008 +0100
     1.2 +++ b/tools/ioemu/vl.c	Wed Apr 02 15:46:52 2008 +0100
     1.3 @@ -1762,7 +1762,8 @@ static int store_dev_info(char *devName,
     1.4                            CharDriverState *cState, char *storeString)
     1.5  {
     1.6  #ifdef CONFIG_STUBDOM
     1.7 -    return 0;
     1.8 +    fprintf(logfile, "can't store dev %s name for domid %d in %s from a stub domain\n", devName, domid, storeString);
     1.9 +    return ENOSYS;
    1.10  #else
    1.11      int xc_handle;
    1.12      struct xs_handle *xs;
     2.1 --- a/tools/ioemu/xenstore.c	Wed Apr 02 15:32:13 2008 +0100
     2.2 +++ b/tools/ioemu/xenstore.c	Wed Apr 02 15:46:52 2008 +0100
     2.3 @@ -347,10 +347,6 @@ extern int vga_ram_size, bios_size;
     2.4  
     2.5  void xenstore_process_logdirty_event(void)
     2.6  {
     2.7 -#ifdef CONFIG_STUBDOM
     2.8 -    /* XXX we just can't use shm. */
     2.9 -    return;
    2.10 -#else
    2.11      char *act;
    2.12      static char *active_path = NULL;
    2.13      static char *next_active_path = NULL;
    2.14 @@ -392,6 +388,12 @@ void xenstore_process_logdirty_event(voi
    2.15          /* Map the shared-memory segment */
    2.16          fprintf(logfile, "%s: key=%16.16llx size=%lu\n", __FUNCTION__,
    2.17                  (unsigned long long)key, logdirty_bitmap_size);
    2.18 +
    2.19 +#ifdef CONFIG_STUBDOM
    2.20 +        /* XXX we just can't use shm. */
    2.21 +        fprintf(logfile, "Log dirty is not implemented in stub domains!\n");
    2.22 +        return;
    2.23 +#else
    2.24          shmid = shmget(key, 2 * logdirty_bitmap_size, S_IRUSR|S_IWUSR);
    2.25          if (shmid == -1) {
    2.26              fprintf(logfile, "Log-dirty: shmget failed: segment %16.16llx "
    2.27 @@ -417,6 +419,7 @@ void xenstore_process_logdirty_event(voi
    2.28              seg = NULL;
    2.29              return;
    2.30          }
    2.31 +#endif
    2.32  
    2.33          /* Remember the paths for the next-active and active entries */
    2.34          if (pasprintf(&active_path, 
    2.35 @@ -453,7 +456,6 @@ void xenstore_process_logdirty_event(voi
    2.36      /* Ack that we've switched */
    2.37      xs_write(xsh, XBT_NULL, active_path, act, len);
    2.38      free(act);
    2.39 -#endif
    2.40  }
    2.41  
    2.42