mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Many files: new file Clean up dom0 proc interfaces. Implemented ioremap and /dev/mem. .del-dom0_block.c~63815c1974691c1c: Delete: xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_block.c .del-sched_ops.c~20807e5c2ed6b51: Delete: xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/sched_ops.c .del-xi_list~49abab167156959: Delete: tools/internal/xi_list .del-xl_physdisk_proc.c~49451bc26a40fcb2: Delete: xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c .del-mmu.h~6bc56547519b6f96: Delete: xenolinux-2.4.21-sparse/include/asm-xeno/mmu.h .del-dom0.h~6fb656bb4a0c52e1: Delete: xenolinux-2.4.21-sparse/include/asm-xeno/dom0.h .del-dom0_ops.h~fb19960d77217740: Delete: tools/internal/dom0_ops.h .del-dom0_ops.h~5c52b016e619bd2d: Delete: xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_ops.h .del-dom0_memory.c~c72c6e5f7fd65d38: Delete: xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_memory.c .del-direct_map.c~d2fedc686b334f2a: Delete: xenolinux-2.4.21-sparse/arch/xeno/mm/direct_map.c direct_map.c: Rename: xenolinux-2.4.21-sparse/arch/xeno/mm/get_unmapped_area.c -> xenolinux-2.4.21-sparse/arch/xeno/mm/direct_map.c
47 lines
1.1 KiB
C
47 lines
1.1 KiB
C
|
|
#define _GNU_SOURCE
|
|
#include "dom0_defs.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
privcmd_blkmsg_t blkmsg;
|
|
physdisk_probebuf_t buf;
|
|
int i;
|
|
|
|
if ( argc != 2 )
|
|
{
|
|
fprintf(stderr, "Usage: xi_phys_probe <domain_nr>\n");
|
|
return 1;
|
|
}
|
|
|
|
memset(&buf, 0, sizeof(buf));
|
|
|
|
do {
|
|
buf.domain = atol(argv[1]);
|
|
buf.n_aces = PHYSDISK_MAX_ACES_PER_REQUEST;
|
|
|
|
blkmsg.op = XEN_BLOCK_PHYSDEV_PROBE;
|
|
blkmsg.buf = &buf;
|
|
blkmsg.buf_size = sizeof(buf);
|
|
|
|
if ( do_xen_blkmsg(&blkmsg) < 0 )
|
|
return 1;
|
|
|
|
for ( i = 0; i < buf.n_aces; i++ )
|
|
{
|
|
char read = (buf.entries[i].mode & 1 ? 'r' : ' ');
|
|
char write = (buf.entries[i].mode & 2 ? 'w' : ' ');
|
|
printf("%x %x %lx %lx %c%c\n",
|
|
physdev_to_xldev(buf.entries[i].device),
|
|
buf.entries[i].partition,
|
|
buf.entries[i].start_sect,
|
|
buf.entries[i].n_sectors, read, write);
|
|
}
|
|
|
|
buf.start_ind += buf.n_aces;
|
|
}
|
|
while ( buf.n_aces == PHYSDISK_MAX_ACES_PER_REQUEST );
|
|
|
|
return 0;
|
|
}
|