Searched refs:str (Results 1 - 25 of 48) sorted by relevance

12

/systemd/src/basic/
H A Dstrbuf.c46 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 Dutf8.c81 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 Dutf8.h37 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 Ddevice-nodes.c39 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 Ddevice-nodes.h25 int encode_devnode_name(const char *str, char *str_enc, size_t len);
H A Dstrbuf.h52 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 Daf-list.c26 static const struct af_name* lookup_af(register const char *str, register unsigned int len);
H A Darphrd-list.c26 static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
H A Derrno-list.c25 static const struct errno_name* lookup_errno(register const char *str,
H A Dcap-list.c29 static const struct capability_name* lookup_capability(register const char *str, register unsigned int len);
H A Dstring-table.h78 int name##_to_string_alloc(type i, char **str) { \
90 *str = s; \
/systemd/src/libudev/
H A Dlibudev-util.c164 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 Dudev-builtin-net_id.c207 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 Dudevadm-info.c87 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 Dtest-journal-syslog.c25 static void test_syslog_parse_identifier(const char* str, argument
27 const char *buf = str;
/systemd/src/test/
H A Dtest-libudev.c35 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 Dtest-af-list.c27 static const struct af_name* lookup_af(register const char *str, register unsigned int len);
H A Dtest-arphrd-list.c27 static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
/systemd/src/boot/efi/
H A Dutil.c110 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 Dtest-lldp.c137 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 Dbus-endpoint.c40 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 Dbus-policy.c119 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 Dbus-match.c105 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 Dbus-kernel.c111 (*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 Dbus-match.h57 char *str; member in struct:bus_match_node::__anon119::__anon120

Completed in 41 milliseconds

12