Lines Matching refs:il

1786 iovlist_init(struct iovlist *il)
1789 il->iovcnt = 0;
1790 il->totalsize = 0;
1794 iovlist_append(struct iovlist *il, const char *str)
1799 if (il->iovcnt < nitems(il->iov)) {
1801 il->iov[il->iovcnt++] = (struct iovec){
1805 il->totalsize += size;
1811 iovlist_truncate(struct iovlist *il, size_t size)
1816 while (il->totalsize > size) {
1817 diff = il->totalsize - size;
1818 last = &il->iov[il->iovcnt - 1];
1821 --il->iovcnt;
1822 il->totalsize -= last->iov_len;
1826 il->totalsize -= diff;
1833 fprintlog_write(struct filed *f, struct iovlist *il, int flags)
1863 iovlist_truncate(il, MaxForwardLen);
1871 msghdr.msg_iov = il->iov;
1872 msghdr.msg_iovlen = il->iovcnt;
1881 if (lsent == (ssize_t)il->totalsize)
1884 if (lsent == (ssize_t)il->totalsize && !send_to_all)
1887 dprintf("lsent/totalsize: %zd/%zu\n", lsent, il->totalsize);
1888 if (lsent != (ssize_t)il->totalsize) {
1918 iovlist_append(il, "\n");
1919 if (writev(f->f_file, il->iov, il->iovcnt) < 0) {
1939 iovlist_append(il, "\n");
1947 if (writev(f->f_file, il->iov, il->iovcnt) < 0) {
1962 iovlist_append(il, "\r\n");
1964 if ((msgret = ttymsg(il->iov, il->iovcnt, f->fu_fname, 10))) {
1973 iovlist_append(il, "\r\n");
1974 wallmsg(f, il->iov, il->iovcnt);
1986 struct iovlist il;
1991 iovlist_init(&il);
1993 iovlist_append(&il, "\r\n\aMessage from syslogd ...\r\n");
1994 iovlist_append(&il, "<");
1996 iovlist_append(&il, priority_number);
1997 iovlist_append(&il, ">1 ");
2012 iovlist_append(&il, timebuf);
2014 iovlist_append(&il, "-");
2015 iovlist_append(&il, " ");
2016 iovlist_append(&il, hostname);
2017 iovlist_append(&il, " ");
2018 iovlist_append(&il, app_name == NULL ? "-" : app_name);
2019 iovlist_append(&il, " ");
2020 iovlist_append(&il, procid == NULL ? "-" : procid);
2021 iovlist_append(&il, " ");
2022 iovlist_append(&il, msgid == NULL ? "-" : msgid);
2023 iovlist_append(&il, " ");
2024 iovlist_append(&il, structured_data == NULL ? "-" : structured_data);
2025 iovlist_append(&il, " ");
2026 iovlist_append(&il, msg);
2028 fprintlog_write(f, &il, flags);
2035 struct iovlist il;
2046 iovlist_init(&il);
2050 iovlist_append(&il, "<");
2053 iovlist_append(&il, priority_number);
2054 iovlist_append(&il, ">");
2055 iovlist_append(&il, timebuf);
2057 iovlist_append(&il, " Forwarded from ");
2058 iovlist_append(&il, hostname);
2059 iovlist_append(&il, ":");
2061 iovlist_append(&il, " ");
2066 iovlist_append(&il, "\r\n\aMessage from syslogd@");
2067 iovlist_append(&il, hostname);
2068 iovlist_append(&il, " at ");
2069 iovlist_append(&il, timebuf);
2070 iovlist_append(&il, " ...\r\n");
2075 iovlist_append(&il, timebuf);
2076 iovlist_append(&il, " ");
2079 iovlist_append(&il, "<");
2086 iovlist_append(&il, c->c_name);
2096 iovlist_append(&il, facility_number);
2099 iovlist_append(&il, ".");
2106 iovlist_append(&il, c->c_name);
2115 iovlist_append(&il, priority_number);
2118 iovlist_append(&il, "> ");
2121 iovlist_append(&il, hostname);
2122 iovlist_append(&il, " ");
2128 iovlist_append(&il, app_name);
2130 iovlist_append(&il, "[");
2131 iovlist_append(&il, procid);
2132 iovlist_append(&il, "]");
2134 iovlist_append(&il, ": ");
2136 iovlist_append(&il, msg);
2138 fprintlog_write(f, &il, flags);