ia64/xen-unstable

changeset 6643:2a1b32bb4df4

Rename XS_GET_DOMAIN_PATH to XS_GET_DOMAIN_PATH and add libxenstore binding.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Mon Sep 05 16:00:03 2005 +0000 (2005-09-05)
parents 3ba3e5fc2530
children 0856c511a83e
files tools/xenstore/xenstored.h tools/xenstore/xenstored_core.c tools/xenstore/xenstored_domain.c tools/xenstore/xs.c tools/xenstore/xs.h
line diff
     1.1 --- a/tools/xenstore/xenstored.h	Mon Sep 05 15:46:12 2005 +0000
     1.2 +++ b/tools/xenstore/xenstored.h	Mon Sep 05 16:00:03 2005 +0000
     1.3 @@ -42,7 +42,7 @@ enum xsd_sockmsg_type
     1.4  	XS_OP_READ_ONLY = XS_TRANSACTION_END,
     1.5  	XS_INTRODUCE,
     1.6  	XS_RELEASE,
     1.7 -	XS_GETDOMAINPATH,
     1.8 +	XS_GET_DOMAIN_PATH,
     1.9  	XS_WRITE,
    1.10  	XS_MKDIR,
    1.11  	XS_RM,
     2.1 --- a/tools/xenstore/xenstored_core.c	Mon Sep 05 15:46:12 2005 +0000
     2.2 +++ b/tools/xenstore/xenstored_core.c	Mon Sep 05 16:00:03 2005 +0000
     2.3 @@ -140,7 +140,7 @@ static char *sockmsg_string(enum xsd_soc
     2.4  	case XS_TRANSACTION_END: return "TRANSACTION_END";
     2.5  	case XS_INTRODUCE: return "INTRODUCE";
     2.6  	case XS_RELEASE: return "RELEASE";
     2.7 -	case XS_GETDOMAINPATH: return "GETDOMAINPATH";
     2.8 +	case XS_GET_DOMAIN_PATH: return "GET_DOMAIN_PATH";
     2.9  	case XS_WRITE: return "WRITE";
    2.10  	case XS_MKDIR: return "MKDIR";
    2.11  	case XS_RM: return "RM";
    2.12 @@ -1277,7 +1277,7 @@ static void process_message(struct conne
    2.13  		do_release(conn, onearg(in));
    2.14  		break;
    2.15  
    2.16 -	case XS_GETDOMAINPATH:
    2.17 +	case XS_GET_DOMAIN_PATH:
    2.18  		do_get_domain_path(conn, onearg(in));
    2.19  		break;
    2.20  
     3.1 --- a/tools/xenstore/xenstored_domain.c	Mon Sep 05 15:46:12 2005 +0000
     3.2 +++ b/tools/xenstore/xenstored_domain.c	Mon Sep 05 16:00:03 2005 +0000
     3.3 @@ -389,7 +389,7 @@ void do_get_domain_path(struct connectio
     3.4  	if (!domain) 
     3.5  		send_error(conn, ENOENT);
     3.6  	else
     3.7 -		send_reply(conn, XS_GETDOMAINPATH, domain->path,
     3.8 +		send_reply(conn, XS_GET_DOMAIN_PATH, domain->path,
     3.9  			   strlen(domain->path) + 1);
    3.10  }
    3.11  
     4.1 --- a/tools/xenstore/xs.c	Mon Sep 05 15:46:12 2005 +0000
     4.2 +++ b/tools/xenstore/xs.c	Mon Sep 05 16:00:03 2005 +0000
     4.3 @@ -613,6 +613,15 @@ bool xs_release_domain(struct xs_handle 
     4.4  	return xs_bool(xs_single(h, XS_RELEASE, domid_str, NULL));
     4.5  }
     4.6  
     4.7 +char *xs_get_domain_path(struct xs_handle *h, domid_t domid)
     4.8 +{
     4.9 +	char domid_str[MAX_STRLEN(domid)];
    4.10 +
    4.11 +	sprintf(domid_str, "%u", domid);
    4.12 +
    4.13 +	return xs_single(h, XS_GET_DOMAIN_PATH, domid_str, NULL);
    4.14 +}
    4.15 +
    4.16  bool xs_shutdown(struct xs_handle *h)
    4.17  {
    4.18  	bool ret = xs_bool(xs_single(h, XS_SHUTDOWN, "", NULL));
     5.1 --- a/tools/xenstore/xs.h	Mon Sep 05 15:46:12 2005 +0000
     5.2 +++ b/tools/xenstore/xs.h	Mon Sep 05 16:00:03 2005 +0000
     5.3 @@ -134,6 +134,10 @@ bool xs_introduce_domain(struct xs_handl
     5.4   */
     5.5  bool xs_release_domain(struct xs_handle *h, domid_t domid);
     5.6  
     5.7 +/* Query the home path of a domain.
     5.8 + */
     5.9 +char *xs_get_domain_path(struct xs_handle *h, domid_t domid);
    5.10 +
    5.11  /* Only useful for DEBUG versions */
    5.12  char *xs_debug_command(struct xs_handle *h, const char *cmd,
    5.13  		       void *data, unsigned int len);