-/* $OpenBSD: subr_log.c,v 1.21 2014/07/12 18:43:32 tedu Exp $ */
+/* $OpenBSD: subr_log.c,v 1.22 2014/07/28 20:30:01 bluhm Exp $ */
/* $NetBSD: subr_log.c,v 1.11 1996/03/30 22:24:44 christos Exp $ */
/*
struct iovec aiov;
struct uio auio;
struct file *f;
+ size_t len;
int error;
if (syslogf == NULL)
}
#endif
+ len = auio.uio_resid;
error = sosend(f->f_data, NULL, &auio, NULL, NULL, 0);
+ if (error == 0)
+ len -= auio.uio_resid;
#ifdef KTRACE
if (ktriov != NULL) {
if (error == 0)
- ktrgenio(p, 0, UIO_WRITE, ktriov, aiov.iov_len);
+ ktrgenio(p, -1, UIO_WRITE, ktriov, len);
free(ktriov, M_TEMP, 0);
}
#endif