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-changelog

[Xen-changelog] Move major/minor macros into public header, rename and u

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Move major/minor macros into public header, rename and use.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Aug 2005 18:36:23 +0000
Delivery-date: Wed, 24 Aug 2005 09:07:22 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID b3eb952c04ee963bd7a92e922cb6cb25969e5a0d
# Parent  28e55fad651f64136d608387765c18ed94b0a0a4
Move major/minor macros into public header, rename and use.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 28e55fad651f -r b3eb952c04ee 
linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c   Tue Aug 23 13:18:45 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c   Tue Aug 23 15:26:54 2005
@@ -78,9 +78,6 @@
 /* Information about our VBDs. */
 #define MAX_VBDS 64
 static LIST_HEAD(vbds_list);
-
-#define MAJOR_XEN(dev) ((dev)>>8)
-#define MINOR_XEN(dev) ((dev) & 0xff)
 
 static struct block_device_operations xlvbd_block_fops =
 {
@@ -139,8 +136,8 @@
        struct xlbd_major_info *mi;
        int major, minor, index;
 
-       major = MAJOR_XEN(vdevice);
-       minor = MINOR_XEN(vdevice);
+       major = BLKIF_MAJOR(vdevice);
+       minor = BLKIF_MINOR(vdevice);
 
        switch (major) {
        case IDE0_MAJOR: index = 0; break;
@@ -276,13 +273,13 @@
        struct block_device *bd;
        int err = 0;
 
-       info->dev = MKDEV(MAJOR_XEN(vdevice), MINOR_XEN(vdevice));
+       info->dev = MKDEV(BLKIF_MAJOR(vdevice), BLKIF_MINOR(vdevice));
 
        bd = bdget(info->dev);
        if (bd == NULL)
                return -ENODEV;
 
-       err = xlvbd_alloc_gendisk(MINOR_XEN(vdevice), capacity, vdevice,
+       err = xlvbd_alloc_gendisk(BLKIF_MINOR(vdevice), capacity, vdevice,
                                  vdisk_info, sector_size, info);
 
        bdput(bd);
diff -r 28e55fad651f -r b3eb952c04ee xen/include/public/io/blkif.h
--- a/xen/include/public/io/blkif.h     Tue Aug 23 13:18:45 2005
+++ b/xen/include/public/io/blkif.h     Tue Aug 23 15:26:54 2005
@@ -58,6 +58,9 @@
 #define BLKIF_RSP_ERROR  -1 /* non-specific 'error' */
 #define BLKIF_RSP_OKAY    0 /* non-specific 'okay'  */
 
+#define BLKIF_MAJOR(dev) ((dev)>>8)
+#define BLKIF_MINOR(dev) ((dev) & 0xff)
+
 /*
  * Generate blkif ring structures and types.
  */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Move major/minor macros into public header, rename and use., Xen patchbot -unstable <=