Lines Matching defs:ctx
216 sd_openlog(vfs_context_t ctx)
222 if ((error = vnode_open(PROC_SHUTDOWN_LOG, (O_CREAT | FWRITE | O_NOFOLLOW), 0644, 0, &sd_logvp, ctx))) {
228 vnode_setsize(sd_logvp, (off_t)0, 0, ctx);
232 sd_log(ctx, "Process shutdown log. Current time is %lu (in seconds).\n\n", tv.tv_sec);
238 sd_closelog(vfs_context_t ctx)
242 VNOP_FSYNC(sd_logvp, MNT_WAIT, ctx);
243 error = vnode_close(sd_logvp, FWRITE, ctx);
250 sd_log(vfs_context_t ctx, const char *fmt, ...)
258 if (sd_openlog(ctx) != 0) {
267 UIO_SYSSPACE, IO_UNIT | IO_NOAUTH, vfs_context_ucred(ctx), &resid, vfs_context_proc(ctx));
373 vfs_context_t ctx = vfs_context_current();
395 sd_log(ctx, "%s[%d] had to be forced closed with exit1().\n", p->p_comm, p->p_pid);
425 vfs_context_t ctx = vfs_context_current();
501 sd_log(ctx, "%s[%d]: didn't act on SIGTERM\n", p->p_comm, p->p_pid);
569 sd_closelog(ctx);