aboutsummaryrefslogtreecommitdiffstats
path: root/tools/internal
diff options
context:
space:
mode:
authorsmh22@labyrinth.cl.cam.ac.uk <smh22@labyrinth.cl.cam.ac.uk>2003-11-05 15:12:12 +0000
committersmh22@labyrinth.cl.cam.ac.uk <smh22@labyrinth.cl.cam.ac.uk>2003-11-05 15:12:12 +0000
commit3b1faf84237d3d1aa631b639b28ed096b49351b8 (patch)
tree24b528d19793933a10d2389496f9fcc6b3a199dc /tools/internal
parent6055524e120bae359c1bb427cbca5b9a345bad17 (diff)
downloadxen-3b1faf84237d3d1aa631b639b28ed096b49351b8.tar.gz
xen-3b1faf84237d3d1aa631b639b28ed096b49351b8.tar.bz2
xen-3b1faf84237d3d1aa631b639b28ed096b49351b8.zip
bitkeeper revision 1.564 (3fa9134cYyjxglAlh2gjmCiQ901Z8g)
misc vbd tweaks tidies and fixes
Diffstat (limited to 'tools/internal')
-rw-r--r--tools/internal/dom0_defs.h5
-rw-r--r--tools/internal/xi_phys_grant.c13
2 files changed, 6 insertions, 12 deletions
diff --git a/tools/internal/dom0_defs.h b/tools/internal/dom0_defs.h
index 40181db15a..0c0c4080dd 100644
--- a/tools/internal/dom0_defs.h
+++ b/tools/internal/dom0_defs.h
@@ -58,11 +58,6 @@ static inline int do_privcmd(unsigned int cmd, unsigned long data)
return ret;
}
-static inline int do_xen_blkmsg(privcmd_blkmsg_t *blkmsg)
-{
- return do_privcmd(IOCTL_PRIVCMD_BLKMSG, (unsigned long)blkmsg);
-}
-
static inline int do_xen_hypercall(privcmd_hypercall_t *hypercall)
{
return do_privcmd(IOCTL_PRIVCMD_HYPERCALL, (unsigned long)hypercall);
diff --git a/tools/internal/xi_phys_grant.c b/tools/internal/xi_phys_grant.c
index 9267c5f85d..c5a608ce61 100644
--- a/tools/internal/xi_phys_grant.c
+++ b/tools/internal/xi_phys_grant.c
@@ -26,12 +26,17 @@ int main(int argc, char *argv[])
*/
domain = atoi(argv[2]);
device = atoi(argv[3]);
- /* XXX SMH: hack -- generate device name by addition ptn number */
+ /* XXX SMH: hack -- generate device name by addition ptn number */
vdevice = device + atoi(argv[6]);
op.cmd = BLOCK_IO_OP_VBD_CREATE;
op.u.create_info.domain = domain;
op.u.create_info.vdevice = vdevice;
+ op.u.create_info.mode = 0;
+ if ( strchr(argv[1], 'r') )
+ op.u.create_info.mode |= VBD_MODE_R;
+ if ( strchr(argv[1], 'w') )
+ op.u.create_info.mode |= VBD_MODE_W;
ret = do_block_io_op(&op);
@@ -49,13 +54,7 @@ int main(int argc, char *argv[])
op.u.add_info.extent.device = device;
op.u.add_info.extent.start_sector = atol(argv[4]);
op.u.add_info.extent.nr_sectors = atol(argv[5]);
- op.u.add_info.extent.mode = 0;
- if ( strchr(argv[1], 'r') )
- op.u.add_info.extent.mode |= PHYSDISK_MODE_R;
- if ( strchr(argv[1], 'w') )
- op.u.add_info.extent.mode |= PHYSDISK_MODE_W;
-
ret = do_block_io_op(&op);
if(ret < 0) {