WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Simple script help

To: Steven Hand <Steven.Hand@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Simple script help
From: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 12 Nov 2003 12:35:52 +0000
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, "Tvrtko A. Uršulin" <tvrtko@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx, Ian.Pratt@xxxxxxxxxxxx
Delivery-date: Wed, 12 Nov 2003 12:35:53 +0000
Envelope-to: Steven.Hand@xxxxxxxxxxxx
In-reply-to: Your message of "Wed, 12 Nov 2003 10:40:31 GMT." <E1AJsQK-0007f2-00@xxxxxxxxxxxxxxxxxxxx>
> If you really want to us xi_phys_grant directly the  typing just 
> xi_phys_grant should get you the error message: 
> 
> Usage: xi_physdev_grant_new <r/rw> <domain> <device> <start sector> 
> <n_sectors> <partition>
> 
> The first two are fairly obvious; the <device> is the linux device
> number in question (e.g. for partition /dev/hda3 this would be 0x0800) 
> the start_sector is the first sector that partition (see /proc/partitions) 
> and n_sectors the number of them (ditto). Finally partition is the
> partition number (e.g. in the case of /dev/hda3 it would be 3). 

Rather than looking in /proc/partitions you'd be better off doing
an 'sfdisk -d /dev/hda' to find out the start sector and number
of sectors.

/proc/partitions works in KB rather than sectors, so there are
potentially odd/even problems with the start sector.


Ian

<Prev in Thread] Current Thread [Next in Thread>