Signed-off-by: Matthias Goergens <[email protected]>

 camldm/camldm_stubs.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


# HG changeset patch
# User Matthias Goergens <[email protected]>
# Date 1274191678 -3600
# Node ID d4c8afc706e0d107a8625b2f38d041b05366aef0
# Parent  1cb3d1b1ff2dde64df685e225e1f6570752344e4
camldm/camldm_stubs.c: Camldm.status can deal with empty tables, now. (+comment)

Signed-off-by: Matthias Goergens <[email protected]>

diff --git a/camldm/camldm_stubs.c b/camldm/camldm_stubs.c
--- a/camldm/camldm_stubs.c
+++ b/camldm/camldm_stubs.c
@@ -166,8 +166,13 @@ value camldm_table(value dev)
 
   tmp=Val_int(0);
 
-  do { 
+  do {
     next = dm_get_next_target(dmt, next, &start, &length, &target_type, &params);
+
+    /* This is how dmsetup.c checks for an empty table: */
+    if (!target_type)
+      continue;
+
     dm_task_get_info(dmt, &info);
 
     tuple=caml_alloc_tuple(4);
@@ -181,8 +186,6 @@ value camldm_table(value dev)
     Store_field(r, 1, tmp);
 
     tmp=r;
-
-    printf("params=%s\n",params);
   } while(next);
 
   Store_field(result,9,tmp);
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to