aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkraxel <kraxel>2007-08-16 09:46:16 +0000
committerkraxel <kraxel>2007-08-16 09:46:16 +0000
commitb10b4b302f20aac648e0c03622badbc99c354052 (patch)
tree3d29ece33ff9b4a7e9535e6b8549b6226ead1579
parentc0502bd98529eb55e6f1aeb630c551071f648f09 (diff)
downloadxenwatch-b10b4b302f20aac648e0c03622badbc99c354052.tar.gz
more libvirt bits
-rw-r--r--xenscreen.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/xenscreen.c b/xenscreen.c
index 9a4479d..8cbe178 100644
--- a/xenscreen.c
+++ b/xenscreen.c
@@ -409,6 +409,9 @@ static void usage(FILE *fp)
" -h print this text\n"
" -b print default screen config file\n"
" -z open a screen window with a shell\n"
+#ifdef HAVE_LIBVIRT
+ " -v uri libvirt connect uri\n"
+#endif
"\n"
" -L enable console output logging\n"
" -c screenrc screen config file [%s]\n"
@@ -447,7 +450,7 @@ int main(int argc, char *argv[])
#endif
for (;;) {
- if (-1 == (c = getopt(argc, argv, "hdbLzc:S:u:p:")))
+ if (-1 == (c = getopt(argc, argv, "hdbLzc:S:u:p:v:")))
break;
switch (c) {
@@ -479,6 +482,12 @@ int main(int argc, char *argv[])
printf("%s", builtin_screen_rc);
exit(0);
+#ifdef HAVE_LIBVIRT
+ case 'v':
+ vir_url = optarg;
+ break;
+#endif
+
case 'h':
usage(stdout);
exit(0);
@@ -646,6 +655,7 @@ int main(int argc, char *argv[])
#endif
#ifdef HAVE_LIBVIRT
if (vir_conn) {
+ /* FIXME: polling once per second */
tv.tv_sec = 1;
tv.tv_usec = 0;
}