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

[Xen-devel] write_dev() limitation to 8bit minors

To: Xen development list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] write_dev() limitation to 8bit minors
From: Kurt Garloff <garloff@xxxxxxx>
Date: Tue, 25 Oct 2005 15:26:55 +0200
Delivery-date: Tue, 25 Oct 2005 13:24:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Kurt Garloff <garloff@xxxxxxx>, Xen development list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Organization: SUSE/Novell
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
Hi,

in /etc/xen/scrips/block: write_dev(), there is

  major=$(stat -L -c %t "$1")
  minor=$(stat -L -c %T "$1")
  pdev=$(printf "0x%02x%02x" 0x$major 0x$minor)

Now, major numbers in Linux-2.6 are 12 bits and minors are 20 bits.
Look at e.g. /dev/sdsr
f52:/dev # stat -L -c %T /dev/sdsr
1f0

So, I would suggest to change this to 
  printf "0x$03x%05x" 0x$major 0x$minor
to generate a 32bit devno.

Comments?
-- 
Kurt Garloff, Director SUSE Labs, Novell Inc.

Attachment: pgpHVGsC6oFrJ.pgp
Description: PGP signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] write_dev() limitation to 8bit minors, Kurt Garloff <=