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

[Xen-changelog] [xen-3.1-testing] Put blktap character device back into /dev/xen.



# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1178124163 25200
# Node ID 2678e31d20f329aaa69c6ba7c9ff32d85f51db4c
# Parent  dea0ba4e0de164f6fe80f227d3b170ef4c7051e0
Put blktap character device back into /dev/xen.
Changeset 14895:800aa9f5cec9 accidentally moved it into /var/run/tap
along with the control FIFOs.
Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
---
 tools/blktap/drivers/blktapctrl.c |    6 ++++--
 tools/blktap/lib/blktaplib.h      |    3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff -r dea0ba4e0de1 -r 2678e31d20f3 tools/blktap/drivers/blktapctrl.c
--- a/tools/blktap/drivers/blktapctrl.c Wed May 02 17:14:52 2007 +0100
+++ b/tools/blktap/drivers/blktapctrl.c Wed May 02 09:42:43 2007 -0700
@@ -496,12 +496,12 @@ int blktapctrl_new_blkif(blkif_t *blkif)
                if (!exist) {
                        DPRINTF("Process does not exist:\n");
                        asprintf(&rdctldev, 
-                                "%s/tapctrlread%d", BLKTAP_DEV_DIR, minor);
+                                "%s/tapctrlread%d", BLKTAP_CTRL_DIR, minor);
                        blkif->fds[READ] = open_ctrl_socket(rdctldev);
 
 
                        asprintf(&wrctldev, 
-                                "%s/tapctrlwrite%d", BLKTAP_DEV_DIR, minor);
+                                "%s/tapctrlwrite%d", BLKTAP_CTRL_DIR, minor);
                        blkif->fds[WRITE] = open_ctrl_socket(wrctldev);
                        
                        if (blkif->fds[READ] == -1 || blkif->fds[WRITE] == -1) 
@@ -601,6 +601,8 @@ int open_ctrl_socket(char *devname)
        fd_set socks;
        struct timeval timeout;
 
+       if (mkdir(BLKTAP_CTRL_DIR, 0755) == 0)
+               DPRINTF("Created %s directory\n", BLKTAP_CTRL_DIR);
        ret = mkfifo(devname,S_IRWXU|S_IRWXG|S_IRWXO);
        if ( (ret != 0) && (errno != EEXIST) ) {
                DPRINTF("ERROR: pipe failed (%d)\n", errno);
diff -r dea0ba4e0de1 -r 2678e31d20f3 tools/blktap/lib/blktaplib.h
--- a/tools/blktap/lib/blktaplib.h      Wed May 02 17:14:52 2007 +0100
+++ b/tools/blktap/lib/blktaplib.h      Wed May 02 09:42:43 2007 -0700
@@ -78,9 +78,10 @@ static inline int BLKTAP_MODE_VALID(unsi
 
 #define BLKTAP_IOCTL_KICK 1
 #define MAX_PENDING_REQS       BLK_RING_SIZE
-#define BLKTAP_DEV_DIR   "/var/run/tap"
+#define BLKTAP_DEV_DIR   "/dev/xen"
 #define BLKTAP_DEV_NAME  "blktap"
 #define BLKTAP_DEV_MINOR 0
+#define BLKTAP_CTRL_DIR   "/var/run/tap"
 
 extern int blktap_major;
 

_______________________________________________
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®.