/systemd/src/basic/ |
H A D | process-util.h | 33 #define procfs_file_alloca(pid, field) \ 38 _r_ = ("/proc/self/" field); \ 40 _r_ = alloca(strlen("/proc/") + DECIMAL_STR_MAX(pid_t) + 1 + sizeof(field)); \ 41 sprintf((char*) _r_, "/proc/"PID_FMT"/" field, _pid_); \ 69 int getenv_for_pid(pid_t pid, const char *field, char **_value);
|
H A D | process-util.c | 201 * comm field, argv[0], and also the glibc's internally used 310 static int get_process_id(pid_t pid, const char *field, uid_t *uid) { argument 315 assert(field); 334 if (startswith(l, field)) { 335 l += strlen(field); 551 int getenv_for_pid(pid_t pid, const char *field, char **_value) { argument 560 assert(field); 572 l = strlen(field); 593 if (memcmp(line, field, l) == 0 && line[l] == '=') {
|
H A D | fileio.h | 55 int get_proc_field(const char *filename, const char *pattern, const char *terminator, char **field);
|
/systemd/src/journal/ |
H A D | journald-audit.c | 32 int (*map)(const char *field, const char **p, struct iovec **iov, size_t *n_iov_allocated, unsigned *n_iov); 35 static int map_simple_field(const char *field, const char **p, struct iovec **iov, size_t *n_iov_allocated, unsigned *n_iov) { argument 40 assert(field); 45 l = strlen(field); 51 memcpy(c, field, l); 74 static int map_string_field_internal(const char *field, const char **p, struct iovec **iov, size_t *n_iov_allocated, unsigned *n_iov, bool filter_printable) { argument 79 assert(field); 93 l = strlen(field) + (e - s); 98 *((char*) mempcpy(stpcpy(c, field), s, e - s)) = 0; 106 l = strlen(field); 153 map_string_field(const char *field, const char **p, struct iovec **iov, size_t *n_iov_allocated, unsigned *n_iov) argument 157 map_string_field_printable(const char *field, const char **p, struct iovec **iov, size_t *n_iov_allocated, unsigned *n_iov) argument [all...] |
H A D | journal-file.h | 178 #define JOURNAL_HEADER_CONTAINS(h, field) \ 179 (le64toh((h)->header_size) >= offsetof(Header, field) + sizeof((h)->field)) 202 int journal_file_find_field_object(JournalFile *f, const void *field, uint64_t size, Object **ret, uint64_t *offset); 203 int journal_file_find_field_object_with_hash(JournalFile *f, const void *field, uint64_t size, uint64_t hash, Object **ret, uint64_t *offset);
|
H A D | sd-journal.c | 309 /* Same field? Then let's add this to this OR term */ 1879 static bool field_is_valid(const char *field) { argument 1882 assert(field); 1884 if (isempty(field)) 1887 if (startswith(field, "__")) 1890 for (p = field; *p; p++) { 1907 _public_ int sd_journal_get_data(sd_journal *j, const char *field, const void **data, size_t *size) { argument 1916 assert_return(field, -EINVAL); 1919 assert_return(field_is_valid(field), -EINVAL); 1932 field_length = strlen(field); 2406 sd_journal_query_unique(sd_journal *j, const char *field) argument 2557 sd_journal_enumerate_fields(sd_journal *j, const char **field) argument 2712 lookup_field(const char *field, void *userdata) argument [all...] |
H A D | journal-authenticate.c | 265 gcry_md_write(f->hmac, &o->field.hash, sizeof(o->field.hash)); 266 gcry_md_write(f->hmac, o->field.payload, le64toh(o->object.size) - offsetof(FieldObject, payload));
|
H A D | journal-def.h | 143 FieldObject field; member in union:Object
|
H A D | journal-file.c | 758 o->field.next_hash_offset = o->field.head_data_offset = 0; 769 o->field.next_hash_offset = htole64(offset); 833 const void *field, uint64_t size, uint64_t hash, 841 assert(field && size > 0); 843 /* If the field hash table is empty, we can't find anything */ 847 /* Map the field hash table, if it isn't mapped yet. */ 852 osize = offsetof(Object, field.payload) + size; 868 if (le64toh(o->field.hash) == hash && 870 memcmp(o->field 831 journal_file_find_field_object_with_hash( JournalFile *f, const void *field, uint64_t size, uint64_t hash, Object **ret, uint64_t *offset) argument 886 journal_file_find_field_object( JournalFile *f, const void *field, uint64_t size, Object **ret, uint64_t *offset) argument 1009 journal_file_append_field( JournalFile *f, const void *field, uint64_t size, Object **ret, uint64_t *offset) argument [all...] |
H A D | journalctl.c | 327 " -N --fields List all field names currently used\n" 328 " -F --field=FIELD List all values that a specified field takes\n" 423 { "field", required_argument, NULL, 'F' }, 1275 const char *field; local 1282 NULSTR_FOREACH(field, fields) { 1286 r = sd_journal_query_unique(j, field); 1307 log_debug("Matched %s with pattern %s=%s", u, field, *pattern); 2180 const char *field; local 2182 SD_JOURNAL_FOREACH_FIELD(j, field) { [all...] |
H A D | journal-verify.c | 123 * possible field values. It does not follow any references to 197 "Bad field size (<= %zu): %"PRIu64, 203 if (!VALID64(o->field.next_hash_offset) || 204 !VALID64(o->field.head_data_offset)) { 207 o->field.next_hash_offset, 208 o->field.head_data_offset); 269 o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field", 279 o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field", 288 o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field", 298 o->object.type == OBJECT_DATA_HASH_TABLE ? "data" : "field", [all...] |
/systemd/src/shared/ |
H A D | bus-util.c | 1398 const char *eq, *field; local 1414 field = strndupa(assignment, eq - assignment); 1417 if (streq(field, "CPUQuota")) { 1437 } else if (streq(field, "EnvironmentFile")) { 1444 } else if (STR_IN_SET(field, "AccuracySec", "RandomizedDelaySec", "RuntimeMaxSec")) { 1450 return log_error_errno(r, "Failed to parse %s= parameter: %s", field, eq); 1452 l = strlen(field); 1458 strcpy(mempcpy(n, field, l - 3), "USec"); 1463 r = sd_bus_message_append_basic(m, SD_BUS_TYPE_STRING, field); 1467 rl = rlimit_from_string(field); [all...] |
H A D | bus-util.h | 155 type *field = userdata; \ 160 assert(field); \ 162 value = strempty(name##_to_string(*field)); \
|
H A D | logs-show.c | 81 static int parse_field(const void *data, size_t length, const char *field, char **target, size_t *target_size) { argument 86 assert(field); 89 fl = strlen(field); 93 if (memcmp(data, field, fl)) 295 log_debug("Skipping message without MESSAGE= field."); 467 log_error("Invalid field."); 561 log_error("Invalid field."); 698 /* First round, iterate through the entry and count how often each field appears */
|
/systemd/src/import/ |
H A D | curl-util.h | 52 int curl_header_strdup(const void *contents, size_t sz, const char *field, char **value);
|
H A D | curl-util.c | 381 int curl_header_strdup(const void *contents, size_t sz, const char *field, char **value) { argument 386 l = strlen(field); 390 if (memcmp(p, field, l) != 0)
|
/systemd/src/systemd/ |
H A D | sd-journal.h | 103 int sd_journal_get_data(sd_journal *j, const char *field, const void **data, size_t *l); 126 int sd_journal_query_unique(sd_journal *j, const char *field); 130 int sd_journal_enumerate_fields(sd_journal *j, const char **field); 160 /* Iterate through the all known values of a specific field */ 164 /* Iterate through all known field names */ 165 #define SD_JOURNAL_FOREACH_FIELD(j, field) \ 166 for (sd_journal_restart_fields(j); sd_journal_enumerate_fields((j), &(field)) > 0; )
|
/systemd/src/libsystemd/sd-path/ |
H A D | sd-path.c | 89 static int from_user_dir(const char *field, char **buffer, const char **ret) { argument 97 assert(field); 116 n = strlen(field); 122 if (!strneq(l, field, n)) 182 if (streq(field, "XDG_DESKTOP_DIR")) {
|
/systemd/src/timesync/ |
H A D | timesyncd-manager.c | 112 uint8_t field; member in struct:ntp_msg 162 * Timestamp field of the reply. For this purpose, all the NTP 166 .field = NTP_FIELD(0, 4, NTP_MODE_CLIENT), 335 /* ADJ_NANO uses nanoseconds in the microseconds field */ 557 /* check our "time cookie" (we just stored nanoseconds in the fraction field) */ 572 if (NTP_FIELD_LEAP(ntpmsg.field) == NTP_LEAP_NOTINSYNC || 578 if (!IN_SET(NTP_FIELD_VERSION(ntpmsg.field), 3, 4)) { 579 log_debug("Response NTPv%d. Disconnecting.", NTP_FIELD_VERSION(ntpmsg.field)); 583 if (NTP_FIELD_MODE(ntpmsg.field) != NTP_MODE_SERVER) { 584 log_debug("Unsupported mode %d. Disconnecting.", NTP_FIELD_MODE(ntpmsg.field)); [all...] |
/systemd/src/journal-remote/ |
H A D | journal-remote-parse.c | 226 log_error("Stream declares field with size %zu > DATA_SIZE_MAX = %u", 231 log_warning("Binary field with zero length"); 369 /* we cannot put the field in iovec until we have all data */ 396 char *field; local 411 field = (char*) data - sizeof(uint64_t) - source->field_len; 412 memmove(field + sizeof(uint64_t), field, source->field_len); 414 r = iovw_put(&source->iovw, field + sizeof(uint64_t), source->field_len + source->data_size);
|
/systemd/src/libsystemd/sd-bus/ |
H A D | busctl-introspect.c | 72 _cleanup_free_ char *field = NULL, *value = NULL; local 113 if (streq_ptr(field, "org.freedesktop.DBus.Deprecated")) { 118 } else if (streq_ptr(field, "org.freedesktop.DBus.Method.NoReply")) { 123 } else if (streq_ptr(field, "org.freedesktop.DBus.Property.EmitsChangedSignal")) { 146 free(field); 147 field = name;
|
/systemd/src/libsystemd/sd-network/ |
H A D | sd-network.c | 104 static int network_link_get_string(int ifindex, const char *field, char **ret) { argument 114 r = parse_env_file(p, NEWLINE, field, &s, NULL);
|
/systemd/src/coredump/ |
H A D | coredump.c | 446 _cleanup_free_ char *field = NULL; local 456 field = malloc(9 + size); 457 if (!field) { 462 memcpy(field, "COREDUMP=", 9); 464 n = read(fd, field + 9, size); 472 *ret = field; 475 field = NULL; 897 /* The small core field we allocate on the stack, to keep things simple */
|
/systemd/src/libsystemd-network/ |
H A D | network-internal.c | 41 const char *name, *field; local 46 FOREACH_STRING(field, "ID_NET_NAME_ONBOARD", "ID_NET_NAME_SLOT", "ID_NET_NAME_PATH", "ID_NET_NAME_MAC") { 47 name = udev_device_get_property_value(device, field);
|
/systemd/src/resolve/ |
H A D | resolved-dns-rr.c | 572 #define FIELD_EQUAL(a, b, field) \ 573 ((a).field ## _size == (b).field ## _size && \ 574 memcmp((a).field, (b).field, (a).field ## _size) == 0)
|