ia64/xen-unstable

changeset 18041:86e3027df9d9

blktap: cleanup

Make functions w/o a prototype static and remove redundant
declaration of xs_fire_next_watch().

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jul 11 15:36:40 2008 +0100 (2008-07-11)
parents 3e563929f17a
children 54dec90cbea9
files tools/blktap/drivers/blktapctrl.c tools/blktap/drivers/block-aio.c tools/blktap/drivers/block-qcow.c tools/blktap/drivers/block-ram.c tools/blktap/drivers/block-sync.c tools/blktap/drivers/img2qcow.c tools/blktap/drivers/qcow-create.c tools/blktap/drivers/qcow2raw.c tools/blktap/drivers/tapdisk.c tools/blktap/lib/blktaplib.h tools/blktap/lib/xenbus.c
line diff
     1.1 --- a/tools/blktap/drivers/blktapctrl.c	Fri Jul 11 15:35:50 2008 +0100
     1.2 +++ b/tools/blktap/drivers/blktapctrl.c	Fri Jul 11 15:36:40 2008 +0100
     1.3 @@ -55,6 +55,8 @@
     1.4  #include "blktaplib.h"
     1.5  #include "blktapctrl.h"
     1.6  #include "tapdisk.h"
     1.7 +#include "list.h"
     1.8 +#include "xs_api.h" /* for xs_fire_next_watch() */
     1.9  
    1.10  #define PIDFILE "/var/run/blktapctrl.pid"
    1.11  
    1.12 @@ -638,7 +640,7 @@ fail:
    1.13  	return ret;
    1.14  }
    1.15  
    1.16 -int blktapctrl_new_blkif(blkif_t *blkif)
    1.17 +static int blktapctrl_new_blkif(blkif_t *blkif)
    1.18  {
    1.19  	blkif_info_t *blk;
    1.20  	int major, minor, fd_read, fd_write, type, new;
    1.21 @@ -710,7 +712,7 @@ fail:
    1.22  	return -EINVAL;
    1.23  }
    1.24  
    1.25 -int map_new_blktapctrl(blkif_t *blkif)
    1.26 +static int map_new_blktapctrl(blkif_t *blkif)
    1.27  {
    1.28  	DPRINTF("Received a poll for a new devmap\n");
    1.29  	if (write_msg(blkif->fds[WRITE], CTLMSG_NEWDEV, blkif, NULL) <= 0) {
    1.30 @@ -727,7 +729,7 @@ int map_new_blktapctrl(blkif_t *blkif)
    1.31  	return blkif->minor - 1;
    1.32  }
    1.33  
    1.34 -int unmap_blktapctrl(blkif_t *blkif)
    1.35 +static int unmap_blktapctrl(blkif_t *blkif)
    1.36  {
    1.37  	DPRINTF("Unmapping vbd\n");
    1.38  
     2.1 --- a/tools/blktap/drivers/block-aio.c	Fri Jul 11 15:35:50 2008 +0100
     2.2 +++ b/tools/blktap/drivers/block-aio.c	Fri Jul 11 15:36:40 2008 +0100
     2.3 @@ -118,7 +118,7 @@ static inline void init_fds(struct disk_
     2.4  }
     2.5  
     2.6  /* Open the disk file and initialize aio state. */
     2.7 -int tdaio_open (struct disk_driver *dd, const char *name, td_flag_t flags)
     2.8 +static int tdaio_open (struct disk_driver *dd, const char *name, td_flag_t flags)
     2.9  {
    2.10  	int i, fd, ret = 0, o_flags;
    2.11  	struct td_state    *s   = dd->td_state;
    2.12 @@ -161,7 +161,7 @@ done:
    2.13  	return ret;	
    2.14  }
    2.15  
    2.16 -int tdaio_queue_read(struct disk_driver *dd, uint64_t sector,
    2.17 +static int tdaio_queue_read(struct disk_driver *dd, uint64_t sector,
    2.18  		     int nb_sectors, char *buf, td_callback_t cb,
    2.19  		     int id, void *private)
    2.20  {
    2.21 @@ -174,7 +174,7 @@ int tdaio_queue_read(struct disk_driver 
    2.22  		cb, id, sector, private);
    2.23  }
    2.24  			
    2.25 -int tdaio_queue_write(struct disk_driver *dd, uint64_t sector,
    2.26 +static int tdaio_queue_write(struct disk_driver *dd, uint64_t sector,
    2.27  		      int nb_sectors, char *buf, td_callback_t cb,
    2.28  		      int id, void *private)
    2.29  {
    2.30 @@ -187,14 +187,14 @@ int tdaio_queue_write(struct disk_driver
    2.31  		cb, id, sector, private);
    2.32  }
    2.33  
    2.34 -int tdaio_submit(struct disk_driver *dd)
    2.35 +static int tdaio_submit(struct disk_driver *dd)
    2.36  {
    2.37  	struct tdaio_state *prv = (struct tdaio_state *)dd->private;
    2.38  
    2.39  	return tap_aio_submit(&prv->aio);
    2.40  }
    2.41  			
    2.42 -int tdaio_close(struct disk_driver *dd)
    2.43 +static int tdaio_close(struct disk_driver *dd)
    2.44  {
    2.45  	struct tdaio_state *prv = (struct tdaio_state *)dd->private;
    2.46  	
    2.47 @@ -204,7 +204,7 @@ int tdaio_close(struct disk_driver *dd)
    2.48  	return 0;
    2.49  }
    2.50  
    2.51 -int tdaio_do_callbacks(struct disk_driver *dd, int sid)
    2.52 +static int tdaio_do_callbacks(struct disk_driver *dd, int sid)
    2.53  {
    2.54  	int i, nr_events, rsp = 0;
    2.55  	struct io_event *ep;
    2.56 @@ -234,12 +234,12 @@ repeat:
    2.57  	return rsp;
    2.58  }
    2.59  
    2.60 -int tdaio_get_parent_id(struct disk_driver *dd, struct disk_id *id)
    2.61 +static int tdaio_get_parent_id(struct disk_driver *dd, struct disk_id *id)
    2.62  {
    2.63  	return TD_NO_PARENT;
    2.64  }
    2.65  
    2.66 -int tdaio_validate_parent(struct disk_driver *dd, 
    2.67 +static int tdaio_validate_parent(struct disk_driver *dd, 
    2.68  			  struct disk_driver *parent, td_flag_t flags)
    2.69  {
    2.70  	return -EINVAL;
     3.1 --- a/tools/blktap/drivers/block-qcow.c	Fri Jul 11 15:35:50 2008 +0100
     3.2 +++ b/tools/blktap/drivers/block-qcow.c	Fri Jul 11 15:36:40 2008 +0100
     3.3 @@ -720,7 +720,7 @@ static inline void init_fds(struct disk_
     3.4  }
     3.5  
     3.6  /* Open the disk file and initialize qcow state. */
     3.7 -int tdqcow_open (struct disk_driver *dd, const char *name, td_flag_t flags)
     3.8 +static int tdqcow_open (struct disk_driver *dd, const char *name, td_flag_t flags)
     3.9  {
    3.10  	int fd, len, i, shift, ret, size, l1_table_size, o_flags;
    3.11  	int max_aio_reqs;
    3.12 @@ -937,7 +937,7 @@ fail:
    3.13  	return -1;
    3.14  }
    3.15  
    3.16 -int tdqcow_queue_read(struct disk_driver *dd, uint64_t sector,
    3.17 +static int tdqcow_queue_read(struct disk_driver *dd, uint64_t sector,
    3.18  		      int nb_sectors, char *buf, td_callback_t cb,
    3.19  		      int id, void *private)
    3.20  {
    3.21 @@ -999,7 +999,7 @@ done:
    3.22  	return rsp;
    3.23  }
    3.24  
    3.25 -int tdqcow_queue_write(struct disk_driver *dd, uint64_t sector,
    3.26 +static int tdqcow_queue_write(struct disk_driver *dd, uint64_t sector,
    3.27  		       int nb_sectors, char *buf, td_callback_t cb,
    3.28  		       int id, void *private)
    3.29  {
    3.30 @@ -1057,14 +1057,14 @@ int tdqcow_queue_write(struct disk_drive
    3.31  	return 0;
    3.32  }
    3.33   		
    3.34 -int tdqcow_submit(struct disk_driver *dd)
    3.35 +static int tdqcow_submit(struct disk_driver *dd)
    3.36  {
    3.37          struct tdqcow_state *prv = (struct tdqcow_state *)dd->private;
    3.38  
    3.39  	return tap_aio_submit(&prv->aio);
    3.40  }
    3.41  
    3.42 -int tdqcow_close(struct disk_driver *dd)
    3.43 +static int tdqcow_close(struct disk_driver *dd)
    3.44  {
    3.45  	struct tdqcow_state *s = (struct tdqcow_state *)dd->private;
    3.46  	uint32_t cksum, out;
    3.47 @@ -1092,7 +1092,7 @@ int tdqcow_close(struct disk_driver *dd)
    3.48  	return 0;
    3.49  }
    3.50  
    3.51 -int tdqcow_do_callbacks(struct disk_driver *dd, int sid)
    3.52 +static int tdqcow_do_callbacks(struct disk_driver *dd, int sid)
    3.53  {
    3.54          int ret, i, nr_events, rsp = 0,*ptr;
    3.55          struct io_event *ep;
    3.56 @@ -1276,7 +1276,7 @@ int qcow_create(const char *filename, ui
    3.57  	return 0;
    3.58  }
    3.59  
    3.60 -int qcow_make_empty(struct tdqcow_state *s)
    3.61 +static int qcow_make_empty(struct tdqcow_state *s)
    3.62  {
    3.63  	uint32_t l1_length = s->l1_size * sizeof(uint64_t);
    3.64  
    3.65 @@ -1296,14 +1296,14 @@ int qcow_make_empty(struct tdqcow_state 
    3.66  	return 0;
    3.67  }
    3.68  
    3.69 -int qcow_get_cluster_size(struct tdqcow_state *s)
    3.70 +static int qcow_get_cluster_size(struct tdqcow_state *s)
    3.71  {
    3.72  	return s->cluster_size;
    3.73  }
    3.74  
    3.75  /* XXX: put compressed sectors first, then all the cluster aligned
    3.76     tables to avoid losing bytes in alignment */
    3.77 -int qcow_compress_cluster(struct tdqcow_state *s, int64_t sector_num, 
    3.78 +static int qcow_compress_cluster(struct tdqcow_state *s, int64_t sector_num, 
    3.79                            const uint8_t *buf)
    3.80  {
    3.81  	z_stream strm;
    3.82 @@ -1358,7 +1358,7 @@ int qcow_compress_cluster(struct tdqcow_
    3.83  	return 0;
    3.84  }
    3.85  
    3.86 -int tdqcow_get_parent_id(struct disk_driver *dd, struct disk_id *id)
    3.87 +static int tdqcow_get_parent_id(struct disk_driver *dd, struct disk_id *id)
    3.88  {
    3.89  	off_t off;
    3.90  	char *buf, *filename;
    3.91 @@ -1392,7 +1392,7 @@ int tdqcow_get_parent_id(struct disk_dri
    3.92  	return err;
    3.93  }
    3.94  
    3.95 -int tdqcow_validate_parent(struct disk_driver *child,
    3.96 +static int tdqcow_validate_parent(struct disk_driver *child,
    3.97  			   struct disk_driver *parent, td_flag_t flags)
    3.98  {
    3.99  	struct stat stats;
     4.1 --- a/tools/blktap/drivers/block-ram.c	Fri Jul 11 15:35:50 2008 +0100
     4.2 +++ b/tools/blktap/drivers/block-ram.c	Fri Jul 11 15:36:40 2008 +0100
     4.3 @@ -127,7 +127,7 @@ static inline void init_fds(struct disk_
     4.4  }
     4.5  
     4.6  /* Open the disk file and initialize ram state. */
     4.7 -int tdram_open (struct disk_driver *dd, const char *name, td_flag_t flags)
     4.8 +static int tdram_open (struct disk_driver *dd, const char *name, td_flag_t flags)
     4.9  {
    4.10  	char *p;
    4.11  	uint64_t size;
    4.12 @@ -220,7 +220,7 @@ done:
    4.13  	return ret;
    4.14  }
    4.15  
    4.16 - int tdram_queue_read(struct disk_driver *dd, uint64_t sector,
    4.17 +static int tdram_queue_read(struct disk_driver *dd, uint64_t sector,
    4.18  		      int nb_sectors, char *buf, td_callback_t cb,
    4.19  		      int id, void *private)
    4.20  {
    4.21 @@ -234,7 +234,7 @@ done:
    4.22  	return cb(dd, 0, sector, nb_sectors, id, private);
    4.23  }
    4.24  
    4.25 -int tdram_queue_write(struct disk_driver *dd, uint64_t sector,
    4.26 +static int tdram_queue_write(struct disk_driver *dd, uint64_t sector,
    4.27  		      int nb_sectors, char *buf, td_callback_t cb,
    4.28  		      int id, void *private)
    4.29  {
    4.30 @@ -250,12 +250,12 @@ int tdram_queue_write(struct disk_driver
    4.31  	return cb(dd, 0, sector, nb_sectors, id, private);
    4.32  }
    4.33   		
    4.34 -int tdram_submit(struct disk_driver *dd)
    4.35 +static int tdram_submit(struct disk_driver *dd)
    4.36  {
    4.37  	return 0;	
    4.38  }
    4.39  
    4.40 -int tdram_close(struct disk_driver *dd)
    4.41 +static int tdram_close(struct disk_driver *dd)
    4.42  {
    4.43  	struct tdram_state *prv = (struct tdram_state *)dd->private;
    4.44  	
    4.45 @@ -264,18 +264,18 @@ int tdram_close(struct disk_driver *dd)
    4.46  	return 0;
    4.47  }
    4.48  
    4.49 -int tdram_do_callbacks(struct disk_driver *dd, int sid)
    4.50 +static int tdram_do_callbacks(struct disk_driver *dd, int sid)
    4.51  {
    4.52  	/* always ask for a kick */
    4.53  	return 1;
    4.54  }
    4.55  
    4.56 -int tdram_get_parent_id(struct disk_driver *dd, struct disk_id *id)
    4.57 +static int tdram_get_parent_id(struct disk_driver *dd, struct disk_id *id)
    4.58  {
    4.59  	return TD_NO_PARENT;
    4.60  }
    4.61  
    4.62 -int tdram_validate_parent(struct disk_driver *dd, 
    4.63 +static int tdram_validate_parent(struct disk_driver *dd, 
    4.64  			  struct disk_driver *parent, td_flag_t flags)
    4.65  {
    4.66  	return -EINVAL;
     5.1 --- a/tools/blktap/drivers/block-sync.c	Fri Jul 11 15:35:50 2008 +0100
     5.2 +++ b/tools/blktap/drivers/block-sync.c	Fri Jul 11 15:36:40 2008 +0100
     5.3 @@ -109,7 +109,7 @@ static inline void init_fds(struct disk_
     5.4  }
     5.5  
     5.6  /* Open the disk file and initialize aio state. */
     5.7 -int tdsync_open (struct disk_driver *dd, const char *name, td_flag_t flags)
     5.8 +static int tdsync_open (struct disk_driver *dd, const char *name, td_flag_t flags)
     5.9  {
    5.10  	int i, fd, ret = 0, o_flags;
    5.11  	struct td_state     *s   = dd->td_state;
    5.12 @@ -149,7 +149,7 @@ done:
    5.13  	return ret;	
    5.14  }
    5.15  
    5.16 - int tdsync_queue_read(struct disk_driver *dd, uint64_t sector,
    5.17 +static int tdsync_queue_read(struct disk_driver *dd, uint64_t sector,
    5.18  			       int nb_sectors, char *buf, td_callback_t cb,
    5.19  			       int id, void *private)
    5.20  {
    5.21 @@ -172,7 +172,7 @@ done:
    5.22  	return cb(dd, (ret < 0) ? ret: 0, sector, nb_sectors, id, private);
    5.23  }
    5.24  
    5.25 - int tdsync_queue_write(struct disk_driver *dd, uint64_t sector,
    5.26 +static int tdsync_queue_write(struct disk_driver *dd, uint64_t sector,
    5.27  			       int nb_sectors, char *buf, td_callback_t cb,
    5.28  			       int id, void *private)
    5.29  {
    5.30 @@ -195,12 +195,12 @@ done:
    5.31  	return cb(dd, (ret < 0) ? ret : 0, sector, nb_sectors, id, private);
    5.32  }
    5.33   		
    5.34 -int tdsync_submit(struct disk_driver *dd)
    5.35 +static int tdsync_submit(struct disk_driver *dd)
    5.36  {
    5.37  	return 0;	
    5.38  }
    5.39  
    5.40 -int tdsync_close(struct disk_driver *dd)
    5.41 +static int tdsync_close(struct disk_driver *dd)
    5.42  {
    5.43  	struct tdsync_state *prv = (struct tdsync_state *)dd->private;
    5.44  	
    5.45 @@ -211,18 +211,18 @@ int tdsync_close(struct disk_driver *dd)
    5.46  	return 0;
    5.47  }
    5.48  
    5.49 -int tdsync_do_callbacks(struct disk_driver *dd, int sid)
    5.50 +static int tdsync_do_callbacks(struct disk_driver *dd, int sid)
    5.51  {
    5.52  	/* always ask for a kick */
    5.53  	return 1;
    5.54  }
    5.55  
    5.56 -int tdsync_get_parent_id(struct disk_driver *dd, struct disk_id *id)
    5.57 +static int tdsync_get_parent_id(struct disk_driver *dd, struct disk_id *id)
    5.58  {
    5.59  	return TD_NO_PARENT;
    5.60  }
    5.61  
    5.62 -int tdsync_validate_parent(struct disk_driver *dd, 
    5.63 +static int tdsync_validate_parent(struct disk_driver *dd, 
    5.64  			   struct disk_driver *parent, td_flag_t flags)
    5.65  {
    5.66  	return -EINVAL;
     6.1 --- a/tools/blktap/drivers/img2qcow.c	Fri Jul 11 15:35:50 2008 +0100
     6.2 +++ b/tools/blktap/drivers/img2qcow.c	Fri Jul 11 15:36:40 2008 +0100
     6.3 @@ -61,8 +61,8 @@ static int returned_events = 0, submit_e
     6.4  static uint64_t prev = 0;
     6.5  static char output[25];
     6.6  
     6.7 -void print_bytes(void *ptr, int length) {
     6.8 -
     6.9 +static void print_bytes(void *ptr, int length)
    6.10 +{
    6.11    int i,k;
    6.12    unsigned char *p = ptr;
    6.13  
    6.14 @@ -77,7 +77,7 @@ void print_bytes(void *ptr, int length) 
    6.15      return;
    6.16  }
    6.17  
    6.18 -void debug_output(uint64_t progress, uint64_t size)
    6.19 +static void debug_output(uint64_t progress, uint64_t size)
    6.20  {
    6.21  	uint64_t blocks = size/20;
    6.22  
     7.1 --- a/tools/blktap/drivers/qcow-create.c	Fri Jul 11 15:35:50 2008 +0100
     7.2 +++ b/tools/blktap/drivers/qcow-create.c	Fri Jul 11 15:36:40 2008 +0100
     7.3 @@ -48,7 +48,7 @@
     7.4  
     7.5  #define MAX_NAME_LEN 1000
     7.6  
     7.7 -void help(void)
     7.8 +static void help(void)
     7.9  {
    7.10  	fprintf(stderr, "Qcow-utils: v1.0.0\n");
    7.11  	fprintf(stderr, 
     8.1 --- a/tools/blktap/drivers/qcow2raw.c	Fri Jul 11 15:35:50 2008 +0100
     8.2 +++ b/tools/blktap/drivers/qcow2raw.c	Fri Jul 11 15:36:40 2008 +0100
     8.3 @@ -65,8 +65,8 @@ struct disk_driver ddqcow, ddaio;
     8.4  static uint64_t prev = 0, written = 0;
     8.5  static char output[25];
     8.6  
     8.7 -void print_bytes(void *ptr, int length) {
     8.8 -
     8.9 +static void print_bytes(void *ptr, int length)
    8.10 +{
    8.11    int i,k;
    8.12    unsigned char *p = ptr;
    8.13  
    8.14 @@ -81,7 +81,7 @@ void print_bytes(void *ptr, int length) 
    8.15      return;
    8.16  }
    8.17  
    8.18 -void debug_output(uint64_t progress, uint64_t size)
    8.19 +static void debug_output(uint64_t progress, uint64_t size)
    8.20  {
    8.21  	/*Output progress every 5% */	
    8.22  	uint64_t blocks = size/20;
     9.1 --- a/tools/blktap/drivers/tapdisk.c	Fri Jul 11 15:35:50 2008 +0100
     9.2 +++ b/tools/blktap/drivers/tapdisk.c	Fri Jul 11 15:36:40 2008 +0100
     9.3 @@ -53,14 +53,14 @@ int do_cow_read(struct disk_driver *dd, 
     9.4  #define td_for_each_disk(tds, drv) \
     9.5          for (drv = tds->disks; drv != NULL; drv = drv->next)
     9.6  
     9.7 -void usage(void) 
     9.8 +static void usage(void) 
     9.9  {
    9.10  	fprintf(stderr, "blktap-utils: v1.0.0\n");
    9.11  	fprintf(stderr, "usage: tapdisk <READ fifo> <WRITE fifo>\n");
    9.12          exit(-1);
    9.13  }
    9.14  
    9.15 -void daemonize(void)
    9.16 +static void daemonize(void)
    9.17  {
    9.18  	int i;
    9.19  
    9.20 @@ -121,7 +121,7 @@ static void unmap_disk(struct td_state *
    9.21  	return;
    9.22  }
    9.23  
    9.24 -void sig_handler(int sig)
    9.25 +static void sig_handler(int sig)
    9.26  {
    9.27  	/*Received signal to close. If no disks are active, we close app.*/
    9.28  
    9.29 @@ -512,7 +512,7 @@ static inline void kick_responses(struct
    9.30  	}
    9.31  }
    9.32  
    9.33 -void io_done(struct disk_driver *dd, int sid)
    9.34 +static void io_done(struct disk_driver *dd, int sid)
    9.35  {
    9.36  	struct tap_disk *drv = dd->drv;
    9.37  
    9.38 @@ -537,7 +537,7 @@ segment_start(blkif_request_t *req, int 
    9.39  }
    9.40  
    9.41  uint64_t sends, responds;
    9.42 -int send_responses(struct disk_driver *dd, int res, 
    9.43 +static int send_responses(struct disk_driver *dd, int res, 
    9.44  		   uint64_t sector, int nr_secs, int idx, void *private)
    9.45  {
    9.46  	pending_req_t   *preq;
    10.1 --- a/tools/blktap/lib/blktaplib.h	Fri Jul 11 15:35:50 2008 +0100
    10.2 +++ b/tools/blktap/lib/blktaplib.h	Fri Jul 11 15:36:40 2008 +0100
    10.3 @@ -213,7 +213,6 @@ typedef struct msg_pid {
    10.4  /* xenstore/xenbus: */
    10.5  #define DOMNAME "Domain-0"
    10.6  int setup_probe_watch(struct xs_handle *h);
    10.7 -int xs_fire_next_watch(struct xs_handle *h);
    10.8  
    10.9  
   10.10  /* Abitrary values, must match the underlying driver... */
    11.1 --- a/tools/blktap/lib/xenbus.c	Fri Jul 11 15:35:50 2008 +0100
    11.2 +++ b/tools/blktap/lib/xenbus.c	Fri Jul 11 15:36:40 2008 +0100
    11.3 @@ -354,7 +354,7 @@ static void ueblktap_probe(struct xs_han
    11.4   *are created, we initalise the state and attach a disk.
    11.5   */
    11.6  
    11.7 -int add_blockdevice_probe_watch(struct xs_handle *h, const char *domid)
    11.8 +static int add_blockdevice_probe_watch(struct xs_handle *h, const char *domid)
    11.9  {
   11.10  	char *path;
   11.11  	struct xenbus_watch *vbd_watch;
   11.12 @@ -377,7 +377,7 @@ int add_blockdevice_probe_watch(struct x
   11.13  }
   11.14  
   11.15  /* Asynch callback to check for /local/domain/<DOMID>/name */
   11.16 -void check_dom(struct xs_handle *h, struct xenbus_watch *w, 
   11.17 +static void check_dom(struct xs_handle *h, struct xenbus_watch *w, 
   11.18  	       const char *bepath_im)
   11.19  {
   11.20  	char *domid;
   11.21 @@ -392,7 +392,7 @@ void check_dom(struct xs_handle *h, stru
   11.22  }
   11.23  
   11.24  /* We must wait for xend to register /local/domain/<DOMID> */
   11.25 -int watch_for_domid(struct xs_handle *h)
   11.26 +static int watch_for_domid(struct xs_handle *h)
   11.27  {
   11.28  	struct xenbus_watch *domid_watch;
   11.29  	char *path = NULL;