/systemd/src/basic/ |
H A D | strbuf.c | 46 struct strbuf *str; local 48 str = new0(struct strbuf, 1); 49 if (!str) 52 str->buf = new0(char, 1); 53 if (!str->buf) 55 str->len = 1; 57 str->root = new0(struct strbuf_node, 1); 58 if (!str->root) 60 str->nodes_count = 1; 61 return str; 79 strbuf_complete(struct strbuf *str) argument 88 strbuf_cleanup(struct strbuf *str) argument 128 strbuf_add_string(struct strbuf *str, const char *s, size_t len) argument [all...] |
H A D | utf8.c | 81 static int utf8_encoded_expected_len(const char *str) { argument 84 assert(str); 86 c = (unsigned char) str[0]; 104 int utf8_encoded_to_unichar(const char *str, char32_t *ret_unichar) { argument 108 assert(str); 110 len = utf8_encoded_expected_len(str); 114 *ret_unichar = (char32_t)str[0]; 117 unichar = str[0] & 0x1f; 120 unichar = (char32_t)str[0] & 0x0f; 123 unichar = (char32_t)str[ 147 utf8_is_printable_newline(const char* str, size_t length, bool newline) argument 174 utf8_is_valid(const char *str) argument 192 utf8_escape_invalid(const char *str) argument 219 utf8_escape_non_printable(const char *str) argument 258 ascii_is_valid(const char *str) argument 377 utf8_encoded_valid_unichar(const char *str) argument [all...] |
H A D | utf8.h | 37 bool utf8_is_printable_newline(const char* str, size_t length, bool newline) _pure_; 38 #define utf8_is_printable(str, length) utf8_is_printable_newline(str, length, true) 41 char *utf8_escape_non_printable(const char *str); 46 int utf8_encoded_valid_unichar(const char *str); 47 int utf8_encoded_to_unichar(const char *str, char32_t *ret_unichar);
|
H A D | device-nodes.c | 39 int encode_devnode_name(const char *str, char *str_enc, size_t len) { argument 42 if (str == NULL || str_enc == NULL) 45 for (i = 0, j = 0; str[i] != '\0'; i++) { 48 seqlen = utf8_encoded_valid_unichar(&str[i]); 54 memcpy(&str_enc[j], &str[i], seqlen); 58 } else if (str[i] == '\\' || !whitelisted_char_for_devnode(str[i], NULL)) { 63 sprintf(&str_enc[j], "\\x%02x", (unsigned char) str[i]); 70 str_enc[j] = str[i];
|
H A D | device-nodes.h | 25 int encode_devnode_name(const char *str, char *str_enc, size_t len);
|
H A D | strbuf.h | 52 ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len); 53 void strbuf_complete(struct strbuf *str); 54 void strbuf_cleanup(struct strbuf *str);
|
H A D | af-list.c | 26 static const struct af_name* lookup_af(register const char *str, register unsigned int len);
|
H A D | arphrd-list.c | 26 static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
|
H A D | errno-list.c | 25 static const struct errno_name* lookup_errno(register const char *str,
|
H A D | cap-list.c | 29 static const struct capability_name* lookup_capability(register const char *str, register unsigned int len);
|
H A D | string-table.h | 78 int name##_to_string_alloc(type i, char **str) { \ 90 *str = s; \
|
/systemd/src/libudev/ |
H A D | libudev-util.c | 164 int util_replace_whitespace(const char *str, char *to, size_t len) argument 169 len = strnlen(str, len); 170 while (len && isspace(str[len-1])) 175 while ((i < len) && isspace(str[i])) 181 if (isspace(str[i])) { 182 while (isspace(str[i])) 186 to[j++] = str[i++]; 193 int util_replace_chars(char *str, const char *white) argument 198 while (str[i] != '\0') { 201 if (whitelisted_char_for_devnode(str[ 247 udev_util_encode_string(const char *str, char *str_enc, size_t len) argument 252 util_string_hash32(const char *str) argument 258 util_string_bloom64(const char *str) argument [all...] |
/systemd/src/udev/ |
H A D | udev-builtin-net_id.c | 207 char slots[256], str[256]; local 258 xsprintf(str, "%s/%s/address", slots, dent->d_name); 259 if (read_one_line_file(str, &address) >= 0) { 480 char str[32]; local 487 xsprintf(str, "OUI:%02X%02X%02X%02X%02X%02X", names->mac[0], 490 udev_builtin_hwdb_lookup(dev, NULL, str, NULL, test); 539 char str[IFNAMSIZ]; local 541 xsprintf(str, "%sx%02x%02x%02x%02x%02x%02x", prefix, 544 udev_builtin_add_property(dev, test, "ID_NET_NAME_MAC", str); 552 char str[IFNAMSI local 566 char str[IFNAMSIZ]; local 589 char str[IFNAMSIZ]; local 604 char str[IFNAMSIZ]; local [all...] |
H A D | udevadm-info.c | 87 const char *str; local 99 str = udev_device_get_subsystem(device); 100 if (str == NULL) 101 str = ""; 102 printf(" SUBSYSTEM==\"%s\"\n", str); 103 str = udev_device_get_driver(device); 104 if (str == NULL) 105 str = ""; 106 printf(" DRIVER==\"%s\"\n", str); 116 str 131 const char *str; local [all...] |
/systemd/src/journal/ |
H A D | test-journal-syslog.c | 25 static void test_syslog_parse_identifier(const char* str, argument 27 const char *buf = str;
|
/systemd/src/test/ |
H A D | test-libudev.c | 35 const char *str; local 41 str = udev_device_get_action(device); 42 if (str != NULL) 43 printf("action: '%s'\n", str); 45 str = udev_device_get_syspath(device); 46 printf("syspath: '%s'\n", str); 48 str = udev_device_get_sysname(device); 49 printf("sysname: '%s'\n", str); 51 str = udev_device_get_sysnum(device); 52 if (str ! [all...] |
H A D | test-af-list.c | 27 static const struct af_name* lookup_af(register const char *str, register unsigned int len);
|
H A D | test-arphrd-list.c | 27 static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
|
/systemd/src/boot/efi/ |
H A D | util.c | 110 CHAR16 str[32]; local 112 SPrint(str, 32, L"%d", i); 113 return efivar_set(name, str, persistent); 170 CHAR16 str[32]; local 177 SPrint(str, 32, L"%ld", usec); 178 efivar_set(name, str, FALSE); 237 CHAR16 *str; local 240 str = AllocatePool((len + 1) * sizeof(CHAR16)); 247 utf8len = utf8_to_16(stra + i, str + strlen); 257 str[strle 262 CHAR16 *str; local [all...] |
/systemd/src/libsystemd-network/ |
H A D | test-lldp.c | 137 char *str = NULL; local 147 assert_se(tlv_packet_read_string(m, &str, &length) >= 0); 149 p = strndup(str, length-1); 165 char *str = NULL; local 169 assert_se(tlv_packet_read_string(m, &str, &length) >= 0); 171 p = strndup(str, length); 183 char *str = NULL; local 187 assert_se(tlv_packet_read_string(m, &str, &length) >= 0); 189 p = strndup(str, length); 304 char *str; local 397 char *str; local [all...] |
/systemd/src/core/ |
H A D | bus-endpoint.c | 40 size += ALIGN8(offsetof(struct kdbus_item, str) + strlen(po->name) + 1); 51 n->size = offsetof(struct kdbus_item, str) + strlen(po->name) + 1; 52 strcpy(n->str, po->name);
|
H A D | bus-policy.c | 119 ALIGN8(offsetof(struct kdbus_item, str) + strlen(name) + 1) + 125 strcpy(n->str, name); 126 n->size = offsetof(struct kdbus_item, str) + strlen(n->str) + 1;
|
/systemd/src/libsystemd/sd-bus/ |
H A D | bus-match.c | 105 else if (BUS_MATCH_CAN_HASH(node->parent->type) && node->value.str) 106 hashmap_remove(node->parent->compare.children, node->value.str); 108 free(node->value.str); 155 if (streq_ptr(node->value.str, value_str)) 166 if (streq_ptr(node->value.str, *i)) 176 if (node->value.str[0] != ':' && value_str && value_str[0] == ':') 189 return streq_ptr(node->value.str, value_str); 197 if (streq_ptr(node->value.str, *i)) 205 return namespace_simple_pattern(node->value.str, value_str); 210 return path_simple_pattern(node->value.str, value_st [all...] |
H A D | bus-kernel.c | 111 (*d)->size = offsetof(struct kdbus_item, str) + length + 1; 113 memcpy((*d)->str, s, length + 1); 320 sz += ALIGN8(offsetof(struct kdbus_item, str) + dl + 1); 501 seclabel = d->str; 685 m->creds.comm = d->str; 690 m->creds.tid_comm = d->str; 695 m->creds.exe = d->str; 700 m->creds.cmdline = d->str; 706 m->creds.cgroup = d->str; 736 if (!service_name_is_valid(d->str)) { [all...] |
H A D | bus-match.h | 57 char *str; member in struct:bus_match_node::__anon119::__anon120
|