diff options
Diffstat (limited to 'launchd/privileged_startx/server.c')
-rw-r--r-- | launchd/privileged_startx/server.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/launchd/privileged_startx/server.c b/launchd/privileged_startx/server.c index 4415943..dfe2c58 100644 --- a/launchd/privileged_startx/server.c +++ b/launchd/privileged_startx/server.c @@ -90,19 +90,19 @@ static mach_port_t checkin_or_register(char *bname) { /* We probably were not started by launchd or the old mach_init */ kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp); if (kr != KERN_SUCCESS) { - fprintf(stderr, "mach_port_allocate(): %s\n", mach_error_string(kr)); + asl_log(NULL, NULL, ASL_LEVEL_ERR, "mach_port_allocate(): %s", mach_error_string(kr)); exit(EXIT_FAILURE); } kr = mach_port_insert_right(mach_task_self(), mp, mp, MACH_MSG_TYPE_MAKE_SEND); if (kr != KERN_SUCCESS) { - fprintf(stderr, "mach_port_insert_right(): %s\n", mach_error_string(kr)); + asl_log(NULL, NULL, ASL_LEVEL_ERR, "mach_port_insert_right(): %s", mach_error_string(kr)); exit(EXIT_FAILURE); } kr = bootstrap_register(bootstrap_port, bname, mp); if (kr != KERN_SUCCESS) { - fprintf(stderr, "bootstrap_register(): %s\n", mach_error_string(kr)); + asl_log(NULL, NULL, ASL_LEVEL_ERR, "bootstrap_register(): %s", mach_error_string(kr)); exit(EXIT_FAILURE); } @@ -188,7 +188,7 @@ int server_main(const char *dir) { kr = mach_msg_server(privileged_startx_server, mxmsgsz, mp, 0); if (kr != KERN_SUCCESS) { asl_log(NULL, NULL, ASL_LEVEL_ERR, - "mach_msg_server(mp): %s\n", mach_error_string(kr)); + "mach_msg_server(mp): %s", mach_error_string(kr)); exit(EXIT_FAILURE); } @@ -218,7 +218,7 @@ kern_return_t do_privileged_startx(mach_port_t test_port __attribute__((unused)) ftsp = fts_open((char * const *)path_argv, FTS_PHYSICAL, ftscmp); if(!ftsp) { asl_log(NULL, NULL, ASL_LEVEL_ERR, - "do_privileged_startx: fts_open(%s): %s\n", + "do_privileged_startx: fts_open(%s): %s", script_dir, strerror(errno)); return KERN_FAILURE; } @@ -227,7 +227,7 @@ kern_return_t do_privileged_startx(mach_port_t test_port __attribute__((unused)) ftsent = fts_read(ftsp); if(!ftsent) { asl_log(NULL, NULL, ASL_LEVEL_ERR, - "do_privileged_startx: fts_read(): %s\n", strerror(errno)); + "do_privileged_startx: fts_read(): %s", strerror(errno)); fts_close(ftsp); return KERN_FAILURE; } @@ -236,7 +236,7 @@ kern_return_t do_privileged_startx(mach_port_t test_port __attribute__((unused)) ftsent = fts_children(ftsp, 0); if(!ftsent) { asl_log(NULL, NULL, ASL_LEVEL_ERR, - "do_privileged_startx: fts_children(): %s\n", strerror(errno)); + "do_privileged_startx: fts_children(): %s", strerror(errno)); fts_close(ftsp); return KERN_FAILURE; } @@ -260,7 +260,7 @@ kern_return_t do_privileged_startx(mach_port_t test_port __attribute__((unused)) error_code = system(fn_buf); if(error_code != 0) { asl_log(NULL, NULL, ASL_LEVEL_ERR, - "do_privileged_startx: %s: exited with status %d\n", + "do_privileged_startx: %s: exited with status %d", fn_buf, error_code); retval = KERN_FAILURE; } |