Lines Matching refs:p
37 const char *p, size_t l, in server_process_entry_meta() argument
47 startswith(p, "PRIORITY=") && in server_process_entry_meta()
48 p[9] >= '0' && p[9] <= '9') in server_process_entry_meta()
49 *priority = (*priority & LOG_FACMASK) | (p[9] - '0'); in server_process_entry_meta()
52 startswith(p, "SYSLOG_FACILITY=") && in server_process_entry_meta()
53 p[16] >= '0' && p[16] <= '9') in server_process_entry_meta()
54 *priority = (*priority & LOG_PRIMASK) | ((p[16] - '0') << 3); in server_process_entry_meta()
57 startswith(p, "SYSLOG_FACILITY=") && in server_process_entry_meta()
58 p[16] >= '0' && p[16] <= '9' && in server_process_entry_meta()
59 p[17] >= '0' && p[17] <= '9') in server_process_entry_meta()
60 *priority = (*priority & LOG_PRIMASK) | (((p[16] - '0')*10 + (p[17] - '0')) << 3); in server_process_entry_meta()
63 startswith(p, "SYSLOG_IDENTIFIER=")) { in server_process_entry_meta()
66 t = memdup_suffix0(p + 18, l - 18); in server_process_entry_meta()
73 startswith(p, "MESSAGE=")) { in server_process_entry_meta()
76 t = memdup_suffix0(p + 8, l - 8); in server_process_entry_meta()
84 startswith(p, "OBJECT_PID=") && in server_process_entry_meta()
87 memcpy(buf, p + STRLEN("OBJECT_PID="), in server_process_entry_meta()
113 const char *p; in server_process_entry() local
116 p = buffer; in server_process_entry()
121 e = memchr(p, '\n', *remaining); in server_process_entry()
129 if (e == p) { in server_process_entry()
135 if (IN_SET(*p, '.', '#')) { in server_process_entry()
137 *remaining -= (e - p) + 1; in server_process_entry()
138 p = e + 1; in server_process_entry()
157 q = memchr(p, '=', e - p); in server_process_entry()
159 if (journal_field_valid(p, q - p, false)) { in server_process_entry()
162 l = e - p; in server_process_entry()
176 iovec[n++] = IOVEC_MAKE((char*) p, l); in server_process_entry()
179 server_process_entry_meta(p, l, ucred, in server_process_entry()
186 *remaining -= (e - p) + 1; in server_process_entry()
187 p = e + 1; in server_process_entry()
193 if (*remaining < e - p + 1 + sizeof(uint64_t) + 1) { in server_process_entry()
204 total = (e - p) + 1 + l; in server_process_entry()
211 if ((uint64_t) *remaining < e - p + 1 + sizeof(uint64_t) + l + 1 || in server_process_entry()
223 memcpy(k, p, e - p); in server_process_entry()
224 k[e - p] = '='; in server_process_entry()
225 memcpy(k + (e - p) + 1, e + 1 + sizeof(uint64_t), l); in server_process_entry()
227 if (journal_field_valid(p, e - p, false)) { in server_process_entry()
228 iovec[n] = IOVEC_MAKE(k, (e - p) + 1 + l); in server_process_entry()
232 server_process_entry_meta(k, (e - p) + 1 + l, ucred, in server_process_entry()
240 *remaining -= (e - p) + 1 + sizeof(uint64_t) + l + 1; in server_process_entry()
241 p = e + 1 + sizeof(uint64_t) + l + 1; in server_process_entry()
284 (const char*) iovec[j].iov_base >= p + *remaining) in server_process_entry()
388 void *p; in server_process_native_file() local
394 p = mmap(NULL, ps, PROT_READ, MAP_PRIVATE, fd, 0); in server_process_native_file()
395 if (p == MAP_FAILED) { in server_process_native_file()
400 server_process_native_message(s, p, st.st_size, ucred, tv, label, label_len); in server_process_native_file()
401 assert_se(munmap(p, ps) >= 0); in server_process_native_file()
403 _cleanup_free_ void *p = NULL; in server_process_native_file() local
439 p = malloc(st.st_size); in server_process_native_file()
440 if (!p) { in server_process_native_file()
445 n = pread(fd, p, st.st_size, 0); in server_process_native_file()
449 server_process_native_message(s, p, n, ucred, tv, label, label_len); in server_process_native_file()