Searched refs:len (Results 1 - 25 of 119) sorted by relevance

12345

/systemd/src/basic/
H A Dstring-table.c23 ssize_t string_table_lookup(const char * const *table, size_t len, const char *key) { argument
29 for (i = 0; i < len; ++i)
H A Ddevice-nodes.h25 int encode_devnode_name(const char *str, char *str_enc, size_t len);
H A Dstrbuf.c55 str->len = 1;
128 ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len) { argument
141 if (len == 0)
144 str->in_len += len;
147 c = s[len-1];
148 for (depth = 0; depth <= len; depth++) {
152 off = node->value_off + node->value_len - len;
153 if (depth == len || (node->value_len >= len && memcmp(str->buf + off, s, len)
[all...]
H A DMurmurHash2.c37 uint32_t MurmurHash2 ( const void * key, int len, uint32_t seed ) argument
47 uint32_t h = seed ^ len;
53 while(len >= 4)
65 len -= 4;
70 switch(len)
H A Dutf8.c106 int len, i; local
110 len = utf8_encoded_expected_len(str);
112 switch (len) {
135 for (i = 1; i < len; i++) {
180 int len; local
182 len = utf8_encoded_valid_unichar((const char *)p);
183 if (len < 0)
186 p += len;
202 int len; local
204 len
229 int len; local
378 int len, i, r; local
[all...]
H A DMurmurHash2.h29 uint32_t MurmurHash2 ( const void * key, int len, uint32_t seed );
H A Ddevice-nodes.c39 int encode_devnode_name(const char *str, char *str_enc, size_t len) { argument
51 if (len-j < (size_t)seqlen)
60 if (len-j < 4)
67 if (len-j < 1)
75 if (len-j < 1)
H A Dstrxcpyx.c33 size_t len; local
35 len = strlen(src);
36 if (len >= size) {
41 if (len > 0) {
42 *dest = mempcpy(*dest, src, len);
43 size -= len;
H A Dstrbuf.h28 size_t len; member in struct:strbuf
52 ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len);
H A Dhexdecoct.h39 int unhexmem(const char *p, size_t l, void **mem, size_t *len);
48 int unbase32hexmem(const char *p, size_t l, bool padding, void **mem, size_t *len);
54 int unbase64mem(const char *p, size_t l, void **mem, size_t *len);
H A Dbarrier.c192 ssize_t len; local
200 len = write(b->me, &buf, sizeof(buf));
201 } while (len < 0 && IN_SET(errno, EAGAIN, EINTR));
203 if (len != sizeof(buf))
249 ssize_t len; local
252 len = read(b->them, &buf, sizeof(buf));
253 if (len < 0 && IN_SET(errno, EAGAIN, EINTR))
256 if (len != sizeof(buf))
/systemd/src/boot/efi/
H A Dsplash.h19 EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background);
H A Dpefile.c74 UINTN len; local
83 len = sizeof(dos);
84 err = uefi_call_wrapper(handle->Read, 3, handle, &len, &dos);
87 if (len != sizeof(dos)) {
102 len = sizeof(magic);
103 err = uefi_call_wrapper(handle->Read, 3, handle, &len, &magic);
106 if (len != sizeof(magic)) {
116 len = sizeof(pe);
117 err = uefi_call_wrapper(handle->Read, 3, handle, &len, &pe);
120 if (len !
[all...]
H A Dutil.c183 UINTN len; local
187 len = 1;
189 len = 2;
191 len = 3;
193 len = 4;
195 len = 5;
197 len = 6;
201 switch (len) {
222 for (i = 1; i < len; i++) {
230 return len;
235 UINTN len; local
264 UINTN len; local
311 UINTN len; local
[all...]
/systemd/src/libudev/
H A Dlibudev.c110 size_t len; local
139 len = strlen(key);
140 if (len == 0)
142 while (isspace(key[len-1]))
143 len--;
144 key[len] = '\0';
147 len = strlen(val);
148 if (len == 0)
150 while (isspace(val[len-1]))
151 len
[all...]
H A Dlibudev-util.c155 size_t len; local
159 len = strlen(path);
160 while (len > 0 && path[len-1] == c)
161 path[--len] = '\0';
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
199 int len; local
247 udev_util_encode_string(const char *str, char *str_enc, size_t len) argument
[all...]
/systemd/src/libsystemd-network/
H A Ddhcp-packet.c56 uint16_t dhcp_packet_checksum(uint8_t *buf, size_t len) { argument
58 uint64_t *end_64 = buf_64 + (len / sizeof(uint64_t));
72 if (len % sizeof(uint64_t)) {
77 memcpy(&buf_tail, buf_64, len % sizeof(uint64_t));
93 uint16_t destination_port, uint16_t len) {
96 packet->ip.tot_len = htobe16(len);
107 packet->udp.len = htobe16(len - DHCP_IP_SIZE);
109 packet->ip.check = packet->udp.len;
110 packet->udp.check = dhcp_packet_checksum((uint8_t*)&packet->ip.ttl, len
91 dhcp_packet_append_ip_headers(DHCPPacket *packet, be32_t source_addr, uint16_t source_port, be32_t destination_addr, uint16_t destination_port, uint16_t len) argument
117 dhcp_packet_verify_headers(DHCPPacket *packet, size_t len, bool checksum) argument
[all...]
H A Ddhcp-internal.h38 const void *packet, size_t len);
40 const void *packet, size_t len);
45 typedef int (*dhcp_option_cb_t)(uint8_t code, uint8_t len,
48 int dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_cb_t cb, void *userdata, char **error_message);
54 uint16_t dhcp_packet_checksum(uint8_t *buf, size_t len);
58 uint16_t destination, uint16_t len);
60 int dhcp_packet_verify_headers(DHCPPacket *packet, size_t len, bool checksum);
H A Dsd-dhcp-lease.c290 static int lease_parse_u32(const uint8_t *option, size_t len, uint32_t *ret, uint32_t min) { argument
294 if (len != 4)
304 static int lease_parse_u16(const uint8_t *option, size_t len, uint16_t *ret, uint16_t min) { argument
308 if (len != 2)
318 static int lease_parse_be32(const uint8_t *option, size_t len, be32_t *ret) { argument
322 if (len != 4)
329 static int lease_parse_string(const uint8_t *option, size_t len, char **ret) { argument
333 if (len <= 0)
342 if (memchr(option, 0, len - 1))
345 string = strndup((const char *) option, len);
356 lease_parse_domain(const uint8_t *option, size_t len, char **ret) argument
388 lease_parse_in_addrs(const uint8_t *option, size_t len, struct in_addr **ret, size_t *n_ret) argument
417 lease_parse_routes( const uint8_t *option, size_t len, struct sd_dhcp_route **routes, size_t *routes_size, size_t *routes_allocated) argument
462 lease_parse_classless_routes( const uint8_t *option, size_t len, struct sd_dhcp_route **routes, size_t *routes_size, size_t *routes_allocated) argument
512 dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void *userdata) argument
682 dhcp_lease_insert_private_option(sd_dhcp_lease *lease, uint8_t tag, const void *data, uint8_t len) argument
1066 size_t len; local
[all...]
H A Dtest-dhcp-option.c18 int len; member in struct:option_desc
83 size_t len = sizeof(DHCPMessage) + optlen; local
86 message = malloc0(len);
101 assert_se(dhcp_option_parse(message, len, NULL, NULL, NULL) >= 0);
108 size_t len = sizeof(DHCPMessage) + optlen; local
110 message = malloc0(len);
145 static int test_options_cb(uint8_t code, uint8_t len, const void *option, void *userdata) { argument
153 assert_se((!desc && !code && !len) || desc);
167 desclen = &desc->len;
198 printf("DHCP code %2d(%2d) len
288 size_t offset = 0, len, pos; local
[all...]
H A Ddhcp-option.c145 uint8_t code, len; local
163 len = options[offset ++];
165 if (buflen < offset + len)
172 if (len != 1)
181 if (len == 0)
188 if (memchr(option, 0, len - 1))
191 string = strndup((const char *) option, len);
205 if (len != 1)
215 cb(code, len, option, userdata);
220 offset += len;
229 dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_cb_t cb, void *userdata, char **_error_message) argument
[all...]
/systemd/src/core/
H A Dima-setup.c67 size_t len; local
69 len = strlen(line);
72 if (len > 0 && write(imafd, line, len) < 0)
/systemd/src/udev/
H A Dudev-watch.c62 ssize_t len; local
68 len = readlinkat(dirfd(dir), ent->d_name, device, sizeof(device));
69 if (len <= 0 || len == (ssize_t)sizeof(device))
71 device[len] = '\0';
140 ssize_t len; local
146 len = readlink(filename, device, sizeof(device));
147 if (len <= 0 || (size_t)len == sizeof(device))
149 device[len]
[all...]
/systemd/src/libsystemd/sd-netlink/
H A Dnetlink-socket.c48 socklen_t len = 0, old_len; local
55 r = getsockopt(nl->fd, SOL_NETLINK, NETLINK_LIST_MEMBERSHIPS, NULL, &len);
64 if (len == 0)
67 groups = new0(uint32_t, len);
71 old_len = len;
73 r = getsockopt(nl->fd, SOL_NETLINK, NETLINK_LIST_MEMBERSHIPS, groups, &len);
77 if (old_len != len)
84 for (i = 0; i < len; i++) {
329 size_t len; local
342 len
[all...]
/systemd/src/test/
H A Dtest-siphash24.c25 static int do_test(const uint8_t *in, size_t len, const uint8_t *key) { argument
30 out = siphash24(in, len, key);
39 siphash24_compress(in, len, &state);
53 for (i = 0; i < len; i++) {
54 for (j = i; j < len; j++) {
58 siphash24_compress(&in[j], len - j, &state);

Completed in 46 milliseconds

12345