# HG changeset patch # User Matthias Goergens # Date 1272293888 -3600 # Node ID bd8bc186e7d5bf34fb5015fa8e9f622a5fc91486 # Parent 80bf18992c2a52d6d5bcecfc45b7cc963ebec03c camldm/camldm_stubs.c: Camldm.status can deal with empty tables, now. (+comment) Signed-off-by: Matthias Goergens diff -r 80bf18992c2a -r bd8bc186e7d5 camldm/camldm_stubs.c --- a/camldm/camldm_stubs.c +++ b/camldm/camldm_stubs.c @@ -166,8 +166,13 @@ tmp=Val_int(0); - do { + do { next = dm_get_next_target(dmt, next, &start, &length, &target_type, ¶ms); + + /* 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 @@ Store_field(r, 1, tmp); tmp=r; - - printf("params=%s\n",params); } while(next); Store_field(result,9,tmp);