#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 =
{
.owner = THIS_MODULE,
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;
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);
#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.
*/