SHA256
1
0
forked from pool/xen
OBS User unknown
2008-07-18 23:04:37 +00:00
committed by Git OBS Bridge
parent 8ae8ea2a74
commit f5d6338f4d
101 changed files with 2069 additions and 10556 deletions

View File

@@ -1,7 +1,7 @@
Index: xen-3.2.1-testing/tools/python/xen/xend/server/HalDaemon.py
Index: xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py
===================================================================
--- /dev/null
+++ xen-3.2.1-testing/tools/python/xen/xend/server/HalDaemon.py
+++ xen-3.3.0-testing/tools/python/xen/xend/server/HalDaemon.py
@@ -0,0 +1,238 @@
+#!/usr/bin/env python
+# -*- mode: python; -*-
@@ -241,10 +241,10 @@ Index: xen-3.2.1-testing/tools/python/xen/xend/server/HalDaemon.py
+ print 'Falling off end'
+
+
Index: xen-3.2.1-testing/tools/python/xen/xend/server/Hald.py
Index: xen-3.3.0-testing/tools/python/xen/xend/server/Hald.py
===================================================================
--- /dev/null
+++ xen-3.2.1-testing/tools/python/xen/xend/server/Hald.py
+++ xen-3.3.0-testing/tools/python/xen/xend/server/Hald.py
@@ -0,0 +1,125 @@
+#============================================================================
+# This library is free software; you can redistribute it and/or
@@ -371,10 +371,10 @@ Index: xen-3.2.1-testing/tools/python/xen/xend/server/Hald.py
+ watcher.run()
+ time.sleep(10)
+ watcher.shutdown()
Index: xen-3.2.1-testing/tools/python/xen/xend/server/SrvServer.py
Index: xen-3.3.0-testing/tools/python/xen/xend/server/SrvServer.py
===================================================================
--- xen-3.2.1-testing.orig/tools/python/xen/xend/server/SrvServer.py
+++ xen-3.2.1-testing/tools/python/xen/xend/server/SrvServer.py
--- xen-3.3.0-testing.orig/tools/python/xen/xend/server/SrvServer.py
+++ xen-3.3.0-testing/tools/python/xen/xend/server/SrvServer.py
@@ -56,6 +56,7 @@ from xen.web.SrvDir import SrvDir
from SrvRoot import SrvRoot
@@ -392,14 +392,14 @@ Index: xen-3.2.1-testing/tools/python/xen/xend/server/SrvServer.py
def create():
root = SrvDir()
Index: xen-3.2.1-testing/tools/ioemu/xenstore.c
Index: xen-3.3.0-testing/tools/ioemu/xenstore.c
===================================================================
--- xen-3.2.1-testing.orig/tools/ioemu/xenstore.c
+++ xen-3.2.1-testing/tools/ioemu/xenstore.c
@@ -232,6 +232,16 @@ void xenstore_parse_domain_config(int do
fprintf(stderr, "qemu: could not open hard disk image '%s'\n",
params);
}
--- xen-3.3.0-testing.orig/tools/ioemu/xenstore.c
+++ xen-3.3.0-testing/tools/ioemu/xenstore.c
@@ -230,6 +230,16 @@ void xenstore_parse_domain_config(int hv
*/
waitForDevice(params);
}
+ /* if pyhsical CDROM put a watch on media-present after creating it */
+ if (type && !strcmp(type, "cdrom") && drv && !strcmp(drv, "phy")) {
+ if (pasprintf(&buf, "%s/media-present", bpath) != -1) {
@@ -410,11 +410,11 @@ Index: xen-3.2.1-testing/tools/ioemu/xenstore.c
+ xs_watch(xsh, buf, "media-present");
+ }
+ }
}
}
/* Set a watch for log-dirty requests from the migration tools */
@@ -425,6 +435,50 @@ void xenstore_record_dm_state(char *stat
free(path);
bs = bs_table[hd_index + (is_scsi ? MAX_DISKS : 0)] = bdrv_new(dev);
@@ -566,6 +576,50 @@ void xenstore_record_dm_state(char *stat
xenstore_record_dm("state", state);
}
+void xenstore_process_media_change_event(char **vec)
@@ -464,7 +464,7 @@ Index: xen-3.2.1-testing/tools/ioemu/xenstore.c
void xenstore_process_event(void *opaque)
{
char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL;
@@ -444,6 +498,11 @@ void xenstore_process_event(void *opaque
@@ -585,6 +639,11 @@ void xenstore_process_event(void *opaque
goto out;
}
@@ -476,22 +476,22 @@ Index: xen-3.2.1-testing/tools/ioemu/xenstore.c
if (strncmp(vec[XS_WATCH_TOKEN], "hd", 2) ||
strlen(vec[XS_WATCH_TOKEN]) != 3)
goto out;
Index: xen-3.2.1-testing/tools/ioemu/hw/ide.c
Index: xen-3.3.0-testing/tools/ioemu/hw/ide.c
===================================================================
--- xen-3.2.1-testing.orig/tools/ioemu/hw/ide.c
+++ xen-3.2.1-testing/tools/ioemu/hw/ide.c
@@ -350,6 +350,7 @@ typedef struct IDEState {
uint8_t io_buffer[MAX_MULT_SECTORS*512 + 4];
--- xen-3.3.0-testing.orig/tools/ioemu/hw/ide.c
+++ xen-3.3.0-testing/tools/ioemu/hw/ide.c
@@ -361,6 +361,7 @@ typedef struct IDEState {
uint8_t *io_buffer;
QEMUTimer *sector_write_timer; /* only used for win2k instal hack */
uint32_t irq_count; /* counts IRQs when using win2k install hack */
+ uint8_t send_ua; /* send SENSE_UNIT_ATTENTION on next ready */
} IDEState;
#define BM_STATUS_DMAING 0x01
@@ -1446,8 +1447,15 @@ static void ide_atapi_cmd(IDEState *s)
switch(s->io_buffer[0]) {
case GPCMD_TEST_UNIT_READY:
if (bdrv_is_inserted(s->bs)) {
@@ -1462,8 +1463,15 @@ static void ide_atapi_cmd(IDEState *s)
ASC_MEDIUM_MAY_HAVE_CHANGED);
break;
}
+ if (s->send_ua) {
+ ide_atapi_cmd_error(s, SENSE_UNIT_ATTENTION,
+ ASC_MEDIUM_NOT_PRESENT);