summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2009-02-23 03:43:21 +0100
committerNeal H. Walfield <neal@gnu.org>2009-02-23 03:43:21 +0100
commit72081a0d9f6668345764b38b0e934cf0dbecb676 (patch)
tree9be081785bbea36ccf95c848af363c15d8e9b061
parent333ee1452b608082d68a886cb7a61ed2d3b7aeae (diff)
Use vg_sleep, not sleep.
-rw-r--r--hieronymus/hieronymus.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hieronymus/hieronymus.c b/hieronymus/hieronymus.c
index 6506f8c..24cc86e 100644
--- a/hieronymus/hieronymus.c
+++ b/hieronymus/hieronymus.c
@@ -176,6 +176,11 @@ main (int argc, char *argv[])
epoch = now ();
module_count = sizeof (modules) / sizeof (modules[0]);
+ if (module_count == 0)
+ {
+ printf (DEBUG_BOLD ("No modules to start.") "\n");
+ exit (1);
+ }
vg_addr_t a[module_count];
activities = &a[0];
@@ -285,7 +290,8 @@ main (int argc, char *argv[])
if (i != module_count)
{
debug (5, "Freeing " VG_ADDR_FMT "(" VG_ADDR_FMT "), a %s",
- VG_ADDR_PRINTF (desc->object), VG_ADDR_PRINTF (desc->storage),
+ VG_ADDR_PRINTF (desc->object),
+ VG_ADDR_PRINTF (desc->storage),
vg_cap_type_string (desc->type));
storage_free (desc->storage, true);
}
@@ -330,7 +336,8 @@ main (int argc, char *argv[])
debug (0, "Waiting %"PRIu64" seconds before starting %s",
(deadline - (start - epoch)) / 1000000,
next);
- sleep ((deadline - (start - epoch)) / 1000000);
+ vg_sleep (VG_ADDR_VOID, VG_ADDR_VOID,
+ (deadline - (start - epoch)) * 1000);
}
}