Searched defs:buf (Results 1 - 25 of 120) sorted by relevance

12345

/systemd/src/journal/
H A Dtest-journal-syslog.c27 const char *buf = str; local
31 ret2 = syslog_parse_identifier(&buf, &ident2, &pid2);
H A Dtest-compress-benchmark.c57 char *buf; local
60 buf = malloc(count);
61 assert_se(buf);
64 memzero(buf, count);
67 buf[i] = 'a' + i % ('z' - 'a' + 1);
71 random_bytes(buf, step);
72 memzero(buf + 1*step, step);
73 random_bytes(buf + 2*step, step);
74 memzero(buf + 3*step, step);
75 random_bytes(buf
92 _cleanup_free_ char *text, *buf; local
[all...]
/systemd/src/random-seed/
H A Drandom-seed.c38 _cleanup_free_ void* buf = NULL; local
69 buf = malloc(buf_size);
70 if (!buf) {
116 k = loop_read(seed_fd, buf, buf_size, false);
125 r = loop_write(random_fd, buf, (size_t) k, false);
158 k = loop_read(random_fd, buf, buf_size, false);
169 r = loop_write(seed_fd, buf, (size_t) k, false);
/systemd/src/shared/
H A Dwatchdog.c52 char buf[FORMAT_TIMESPAN_MAX]; local
60 log_info("Set hardware watchdog to %s.", format_timespan(buf, sizeof(buf), watchdog_timeout, 0));
H A Dacpi-fpdt.c82 _cleanup_free_ char *buf = NULL; local
92 r = read_full_file("/sys/firmware/acpi/tables/FPDT", &buf, &l);
99 tbl = (struct acpi_table_header *)buf;
107 for (rec = (struct acpi_fpdt_header *)(buf + sizeof(struct acpi_table_header));
108 (char *)rec < buf + l;
/systemd/src/test/
H A Dtest-date.c28 char buf[FORMAT_TIMESTAMP_MAX], buf_relative[FORMAT_TIMESTAMP_RELATIVE_MAX], *sp; local
31 format_timestamp_us(buf, sizeof(buf), t);
32 log_info("%s", buf);
35 sp = strrchr(buf, ' ');
39 assert_se(parse_timestamp(buf, &q) >= 0);
44 assert_se(parse_timestamp(buf, &q) >= 0);
H A Dtest-calendarspec.c31 char buf[FORMAT_TIMESTAMP_MAX]; local
43 printf("Next: %s\n", r < 0 ? strerror(-r) : format_timestamp(buf, sizeof(buf), u));
57 char buf[FORMAT_TIMESTAMP_MAX]; local
76 printf("At: %s\n", r < 0 ? strerror(-r) : format_timestamp_us(buf, sizeof(buf), u));
/systemd/src/basic/
H A Dstrbuf.h27 char *buf; member in struct:strbuf
H A Dbarrier.c191 static bool barrier_write(Barrier *b, uint64_t buf) { argument
200 len = write(b->me, &buf, sizeof(buf));
203 if (len != sizeof(buf))
207 if (buf >= (uint64_t)BARRIER_ABORTION) {
213 b->barriers += buf;
239 uint64_t buf; local
252 len = read(b->them, &buf, sizeof(buf));
256 if (len != sizeof(buf))
[all...]
H A Dsignal-util.c228 static thread_local char buf[sizeof("RTMIN+")-1 + DECIMAL_STR_MAX(int) + 1]; local
236 xsprintf(buf, "RTMIN+%d", signo - SIGRTMIN);
238 xsprintf(buf, "%d", signo);
240 return buf;
H A Dhostname-util.c177 char buf[HOST_NAME_MAX + 1] = {}; local
181 if (gethostname(buf, sizeof(buf)) < 0)
184 if (streq(buf, s))
H A Dio-util.c37 char buf[LINE_MAX]; local
51 l = read(fd, buf, sizeof(buf));
66 ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) { argument
67 uint8_t *p = buf;
71 assert(buf);
113 int loop_read_exact(int fd, void *buf, size_t nbytes, bool do_poll) { argument
116 n = loop_read(fd, buf, nbytes, do_poll);
125 int loop_write(int fd, const void *buf, size_t nbytes, bool do_poll) { argument
126 const uint8_t *p = buf;
[all...]
/systemd/src/core/
H A Ddbus-service.c239 _cleanup_free_ char *buf = NULL; local
247 f = open_memstream(&buf, &size);
269 unit_write_drop_in_private(UNIT(s), mode, name, buf);
H A Dsmack-setup.c45 char buf[NAME_MAX]; local
99 FOREACH_LINE(buf, policy,
105 if (isempty(truncate_nl(buf)))
110 if (sscanf(buf, "%ms %ms %ms %ms", &sbj, &obj, &acc1, &acc2) < 3) {
111 log_error_errno(errno, "Failed to parse rule '%s' in '%s', ignoring.", buf, entry->d_name);
115 if (write(isempty(acc2) ? load2_fd : change_fd, buf, strlen(buf)) < 0) {
119 buf, isempty(acc2) ? "/sys/fs/smackfs/load2" : "/sys/fs/smackfs/change-rule", entry->d_name);
131 char buf[NAME_MAX]; local
178 FOREACH_LINE(buf, polic
202 char buf[NAME_MAX]; local
[all...]
H A Ddbus-cgroup.c397 _cleanup_free_ char *buf = NULL; local
409 f = open_memstream(&buf, &size);
428 unit_write_drop_in_private(u, mode, name, buf);
481 _cleanup_free_ char *buf = NULL; local
493 f = open_memstream(&buf, &size);
504 unit_write_drop_in_private(u, mode, name, buf);
556 char *buf; local
561 buf = strjoina("DevicePolicy=", policy);
562 unit_write_drop_in_private(u, mode, name, buf);
628 _cleanup_free_ char *buf local
[all...]
H A Ddbus-timer.c51 _cleanup_free_ char *buf = NULL; local
63 buf = new(char, l+2);
64 if (!buf)
67 memcpy(buf, s, l-3);
68 memcpy(buf+l-3, "USec", 5);
70 r = sd_bus_message_append(reply, "(stt)", buf, v->value, v->next_elapse);
100 _cleanup_free_ char *buf = NULL; local
105 r = calendar_spec_to_string(v->calendar_spec, &buf);
109 r = sd_bus_message_append(reply, "(sst)", timer_base_to_string(v->base), buf, v->next_elapse);
H A Dmachine-id-setup.c117 sd_id128_t buf; local
182 r = sd_id128_randomize(&buf);
186 for (p = buf.bytes, q = id; p < buf.bytes + sizeof(buf); p++, q += 2) {
H A Dselinux-access.c120 _cleanup_free_ char *buf = NULL; local
124 r = vasprintf(&buf, fmt, ap);
128 audit_log_user_avc_message(fd, AUDIT_USER_AVC, buf, NULL, NULL, NULL, 0);
/systemd/src/journal-remote/
H A Djournal-remote-parse.h39 char *buf; member in struct:RemoteSource
H A Djournal-upload-journal.c30 * Write up to size bytes to buf. Return negative on error, and number of
33 static ssize_t write_entry(char *buf, size_t size, Uploader *u) { argument
49 r = snprintf(buf + pos, size - pos,
59 buf[size - 1] = '\n';
73 r = snprintf(buf + pos, size - pos,
83 buf[size - 1] = '\n';
98 r = snprintf(buf + pos, size - pos,
108 buf[size - 1] = '\n';
123 r = snprintf(buf + pos, size - pos,
133 buf[siz
245 journal_input_callback(void *buf, size_t size, size_t nmemb, void *userp) argument
[all...]
/systemd/src/libsystemd/sd-bus/
H A Dbus-container.c149 uint8_t buf[CMSG_SPACE(sizeof(int))]; member in union:__anon112
H A Dtest-bus-match.c140 char buf[32]; local
143 assert_se(x = bus_match_node_type_to_string(i, buf, sizeof(buf)));
/systemd/src/libsystemd/sd-id128/
H A Dsd-id128.c113 char buf[33]; local
129 r = loop_read_exact(fd, buf, 33, false);
132 if (buf[32] !='\n')
138 a = unhexchar(buf[j*2]);
139 b = unhexchar(buf[j*2+1]);
158 char buf[36]; local
175 r = loop_read_exact(fd, buf, 36, false);
179 for (j = 0, p = buf; j < 16; j++) {
182 if (p >= buf + 35)
187 if (p >= buf
[all...]
/systemd/src/libsystemd-network/
H A Ddhcp-packet.c56 uint16_t dhcp_packet_checksum(uint8_t *buf, size_t len) { argument
57 uint64_t *buf_64 = (uint64_t*)buf;
/systemd/src/coredump/
H A Dstacktrace.c133 char *buf = NULL; local
143 c.f = open_memstream(&buf, &sz);
183 *ret = buf;
184 buf = NULL;
197 free(buf);

Completed in 77 milliseconds

12345