]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
camldm/camldm_stubs.c: Camldm.status can deal with empty tables, now. (+comment)
authorMatthias Goergens <Matthias.Goergens@citrix.com>
Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)
committerMatthias Goergens <Matthias.Goergens@citrix.com>
Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)
Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
camldm/camldm_stubs.c

index e90a0a9f6fb669904f94d75d0cebb79e4b3dda36..8d9921796da628721f44fc6c8c0d28e24023d56e 100644 (file)
@@ -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);