diff options
Diffstat (limited to 'persistent-hello.c')
| -rw-r--r-- | persistent-hello.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/persistent-hello.c b/persistent-hello.c index 0efc60f..6274e99 100644 --- a/persistent-hello.c +++ b/persistent-hello.c @@ -302,16 +302,13 @@ main (int argc, char **argv) if (err) error (3, err, "trivfs_startup"); - /* Get reincarnation image. */ - mach_port_t *registered_ports = NULL; - size_t registered_ports_len = 0; - err = mach_ports_lookup (mach_task_self (), - ®istered_ports, ®istered_ports_len); + /* Get reincarnation port. */ + err = reincarnation_get_port (mach_task_self (), + &reincarnation); if (err) - error (5, err, "mach_port_lookup"); - - reincarnation = registered_ports[0]; + error (5, err, "reincarnation_get_port"); + /* Get reincarnation image. */ char *image = NULL; size_t image_len = 0; err = reincarnate (reincarnation, &image, &image_len); |
