lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 May 2010 18:10:48 +0200
From:	Soren Hansen <soren@...ux2go.dk>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] Make the Xen block device prefix configurable

Add a config option to tweak the Xen block device prefix.

Signed-off-by: Soren Hansen <soren@...ux2go.dk>
Tested-By: Major Hayden <major.hayden@...kspace.com>
---
 drivers/block/Kconfig        |   10 ++++++++++
 drivers/block/xen-blkfront.c |    2 +-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 1d886e0..89c1887 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -467,6 +467,16 @@ config XEN_BLKDEV_FRONTEND
 	  block device driver.  It communicates with a back-end driver
 	  in another domain which drives the actual block device.
 
+config XEN_BLKDEV_NAME
+	string "Base name for Xen block devices"
+	depends on XEN_BLKDEV_FRONTEND
+	default "xvd"
+	help
+	  Use this as the base name for Xen block devices. This is
+	  traditionally "xvd", but if you're trying to boot a system
+	  that expects to find its root device on /dev/sda, you can
+	  use this setting to accomodate that.
+
 config VIRTIO_BLK
 	tristate "Virtio block driver (EXPERIMENTAL)"
 	depends on EXPERIMENTAL && VIRTIO
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index b8578bb..a8fd8fd 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -117,7 +117,7 @@ static DEFINE_SPINLOCK(blkif_io_lock);
 #define VDEV_IS_EXTENDED(dev) ((dev)&(EXTENDED))
 #define BLKIF_MINOR_EXT(dev) ((dev)&(~EXTENDED))
 
-#define DEV_NAME	"xvd"	/* name in /dev */
+#define DEV_NAME CONFIG_XEN_BLKDEV_NAME /* name in /dev */
 
 static int get_id_from_freelist(struct blkfront_info *info)
 {
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ