[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.