Added AppVM version of xenstore-watch.
This commit is contained in:
parent
a8cef51b67
commit
f05c244321
@ -1,11 +1,14 @@
|
|||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS=-Wall
|
CFLAGS=-Wall
|
||||||
all: qubes_penctl qubes_add_pendrive_script qvm-open-in-dvm
|
all: qubes_penctl qubes_add_pendrive_script qvm-open-in-dvm xenstore-watch
|
||||||
qubes_penctl: qubes_penctl.o
|
qubes_penctl: qubes_penctl.o
|
||||||
$(CC) -o qubes_penctl qubes_penctl.o -lxenstore
|
$(CC) -o qubes_penctl qubes_penctl.o -lxenstore
|
||||||
qubes_add_pendrive_script: qubes_add_pendrive_script.o
|
qubes_add_pendrive_script: qubes_add_pendrive_script.o
|
||||||
$(CC) -o qubes_add_pendrive_script qubes_add_pendrive_script.o -lxenstore
|
$(CC) -o qubes_add_pendrive_script qubes_add_pendrive_script.o -lxenstore
|
||||||
qvm-open-in-dvm: qvm-open-in-dvm.o
|
qvm-open-in-dvm: qvm-open-in-dvm.o
|
||||||
$(CC) -o qvm-open-in-dvm qvm-open-in-dvm.o -lxenstore
|
$(CC) -o qvm-open-in-dvm qvm-open-in-dvm.o -lxenstore
|
||||||
|
xenstore-watch: xenstore-watch.o
|
||||||
|
$(CC) -o xenstore-watch xenstore-watch.o -lxenstore
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f qubes_penctl qubes_add_pendrive_script qvm-open-in-dvm *.o *~
|
rm -f qubes_penctl qubes_add_pendrive_script qvm-open-in-dvm xenstore-watch *.o *~
|
||||||
|
28
appvm/xenstore-watch.c
Normal file
28
appvm/xenstore-watch.c
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#include <sys/types.h>
|
||||||
|
#include <xs.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
struct xs_handle *xs;
|
||||||
|
unsigned int count;
|
||||||
|
char **vec;
|
||||||
|
char dummy;
|
||||||
|
if (argc != 2) {
|
||||||
|
fprintf(stderr, "usage: %s xenstore_path\n", argv[0]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
xs = xs_domain_open();
|
||||||
|
if (!xs) {
|
||||||
|
perror("xs_domain_open");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
if (!xs_watch(xs, argv[1], &dummy)) {
|
||||||
|
perror("xs_watch");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
vec = xs_read_watch(xs, &count);
|
||||||
|
free(vec);
|
||||||
|
vec = xs_read_watch(xs, &count);
|
||||||
|
free(vec);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user