Hi everyone,
I''m making a user application that''s going to run in Xen
guests (both dom0
and domU) and each instance needs to read values from the VM''s unique
space
in XenStore. The way I have done it is use the functions defined in
<xs.h> using the xs_read function to read a value. In command line
I''m able
to use the xenstore-read program and simply pass an argument like
''domid'' or
''vm'' without having to specify an absolute path, it will read
the value in
/local/domain/DOMID/ and I don''t need to worry about what the DOMID is.
When
I try to use this technique in the xs_read function, it returns NULL. It
works fine if I give the absolute path, but I can''t really do that
dynamically since I don''t know the DOMID ahead of time.
Basically I''m trying this:
struct xs_handle* xs;
xs_transaction_t t;
void* domid;
char temp[] = "domid";
xs = xs_daemon_open();
t = xs_transaction_start(xs);
domid = xs_read(xs, t, temp, NULL);
Could someone explain why this doesn''t work or maybe let me know of an
alternative way to read XenStore in a C application without using absolute
paths?
Cheers!
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel