]> xenbits.xen.org Git - xenclient/xen-pq.git/commitdiff
tools-hvm-info: added some debug messages when an error append.
authorAlexandre Bique <alexandre.bique@citrix.com>
Thu, 11 Jun 2009 10:47:00 +0000 (10:47 +0000)
committerAlexandre Bique <alexandre.bique@citrix.com>
Thu, 11 Jun 2009 10:47:00 +0000 (10:47 +0000)
master/tools-hvm-info

index 20cdcfc7e7fb36dc87056e209c5f2cae401b4e58..98beacf9cf202b838b34bbba41fa8a068c6c819d 100644 (file)
@@ -568,10 +568,10 @@ index 0000000..fc13931
 +.SECONDARY:
 diff --git a/tools/hvm-info/main.c b/tools/hvm-info/main.c
 new file mode 100644
-index 0000000..192d25d
+index 0000000..243d546
 --- /dev/null
 +++ b/tools/hvm-info/main.c
-@@ -0,0 +1,25 @@
+@@ -0,0 +1,31 @@
 +#include <xenctrl.h>
 +#include <stdio.h>
 +
@@ -583,10 +583,16 @@ index 0000000..192d25d
 +
 +  xc_handle = xc_interface_open();
 +  if (xc_handle == -1)
++  {
++    fprintf(stderr, "xc_interface_open() failed.\n");
 +    return 1;
++  }
 +
 +  if (xc_physinfo(xc_handle, &info) != 0)
++  {
++    fprintf(stderr, "xc_physinfo() failed.\n");
 +    return 1;
++  }
 +
 +  has_hvm = info.capabilities & XEN_SYSCTL_PHYSCAP_hvm;
 +  has_hvm_directio = info.capabilities & XEN_SYSCTL_PHYSCAP_hvm_directio;