ia64/xen-unstable

changeset 15003:2678e31d20f3

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@cs.ubc.ca>
author Brendan Cully <brendan@cs.ubc.ca>
date Wed May 02 09:42:43 2007 -0700 (2007-05-02)
parents dea0ba4e0de1
children 3a3ca8da6d4e
files tools/blktap/drivers/blktapctrl.c tools/blktap/lib/blktaplib.h
line diff
     1.1 --- a/tools/blktap/drivers/blktapctrl.c	Wed May 02 17:14:52 2007 +0100
     1.2 +++ b/tools/blktap/drivers/blktapctrl.c	Wed May 02 09:42:43 2007 -0700
     1.3 @@ -496,12 +496,12 @@ int blktapctrl_new_blkif(blkif_t *blkif)
     1.4  		if (!exist) {
     1.5  			DPRINTF("Process does not exist:\n");
     1.6  			asprintf(&rdctldev, 
     1.7 -				 "%s/tapctrlread%d", BLKTAP_DEV_DIR, minor);
     1.8 +				 "%s/tapctrlread%d", BLKTAP_CTRL_DIR, minor);
     1.9  			blkif->fds[READ] = open_ctrl_socket(rdctldev);
    1.10  
    1.11  
    1.12  			asprintf(&wrctldev, 
    1.13 -				 "%s/tapctrlwrite%d", BLKTAP_DEV_DIR, minor);
    1.14 +				 "%s/tapctrlwrite%d", BLKTAP_CTRL_DIR, minor);
    1.15  			blkif->fds[WRITE] = open_ctrl_socket(wrctldev);
    1.16  			
    1.17  			if (blkif->fds[READ] == -1 || blkif->fds[WRITE] == -1) 
    1.18 @@ -601,6 +601,8 @@ int open_ctrl_socket(char *devname)
    1.19  	fd_set socks;
    1.20  	struct timeval timeout;
    1.21  
    1.22 +	if (mkdir(BLKTAP_CTRL_DIR, 0755) == 0)
    1.23 +		DPRINTF("Created %s directory\n", BLKTAP_CTRL_DIR);
    1.24  	ret = mkfifo(devname,S_IRWXU|S_IRWXG|S_IRWXO);
    1.25  	if ( (ret != 0) && (errno != EEXIST) ) {
    1.26  		DPRINTF("ERROR: pipe failed (%d)\n", errno);
     2.1 --- a/tools/blktap/lib/blktaplib.h	Wed May 02 17:14:52 2007 +0100
     2.2 +++ b/tools/blktap/lib/blktaplib.h	Wed May 02 09:42:43 2007 -0700
     2.3 @@ -78,9 +78,10 @@ static inline int BLKTAP_MODE_VALID(unsi
     2.4  
     2.5  #define BLKTAP_IOCTL_KICK 1
     2.6  #define MAX_PENDING_REQS	BLK_RING_SIZE
     2.7 -#define BLKTAP_DEV_DIR   "/var/run/tap"
     2.8 +#define BLKTAP_DEV_DIR   "/dev/xen"
     2.9  #define BLKTAP_DEV_NAME  "blktap"
    2.10  #define BLKTAP_DEV_MINOR 0
    2.11 +#define BLKTAP_CTRL_DIR   "/var/run/tap"
    2.12  
    2.13  extern int blktap_major;
    2.14