summaryrefslogtreecommitdiffstats
path: root/hw/xen_backend.c
diff options
context:
space:
mode:
authorAnthony Liguori2013-04-05 19:52:32 +0200
committerAnthony Liguori2013-04-05 19:52:32 +0200
commit54baa6f3c07a155939a6edda6d17706a6e9ab11c (patch)
treef723f313e06a4b0d51b72d27ca60889c92b06f52 /hw/xen_backend.c
parentMerge remote-tracking branch 'kwolf/for-anthony' into staging (diff)
parentAllow xen guests to plug disks of 1 TiB or more (diff)
downloadqemu-54baa6f3c07a155939a6edda6d17706a6e9ab11c.tar.gz
qemu-54baa6f3c07a155939a6edda6d17706a6e9ab11c.tar.xz
qemu-54baa6f3c07a155939a6edda6d17706a6e9ab11c.zip
Merge remote-tracking branch 'sstabellini/xen-2013-04-05' into staging
# By Alex Bligh (2) and Felipe Franciosi (2) # Via Stefano Stabellini * sstabellini/xen-2013-04-05: Allow xen guests to plug disks of 1 TiB or more Introduce 64 bit integer write interface to xenstore Xen PV backend: Disable use of O_DIRECT by default as it results in crashes. Xen PV backend: Move call to bdrv_new from blk_init to blk_connect
Diffstat (limited to 'hw/xen_backend.c')
-rw-r--r--hw/xen_backend.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/xen_backend.c b/hw/xen_backend.c
index 24381b55e5..02693d7565 100644
--- a/hw/xen_backend.c
+++ b/hw/xen_backend.c
@@ -85,12 +85,20 @@ char *xenstore_read_str(const char *base, const char *node)
int xenstore_write_int(const char *base, const char *node, int ival)
{
- char val[32];
+ char val[12];
snprintf(val, sizeof(val), "%d", ival);
return xenstore_write_str(base, node, val);
}
+int xenstore_write_int64(const char *base, const char *node, int64_t ival)
+{
+ char val[21];
+
+ snprintf(val, sizeof(val), "%"PRId64, ival);
+ return xenstore_write_str(base, node, val);
+}
+
int xenstore_read_int(const char *base, const char *node, int *ival)
{
char *val;
@@ -114,6 +122,11 @@ int xenstore_write_be_int(struct XenDevice *xendev, const char *node, int ival)
return xenstore_write_int(xendev->be, node, ival);
}
+int xenstore_write_be_int64(struct XenDevice *xendev, const char *node, int64_t ival)
+{
+ return xenstore_write_int64(xendev->be, node, ival);
+}
+
char *xenstore_read_be_str(struct XenDevice *xendev, const char *node)
{
return xenstore_read_str(xendev->be, node);