/systemd/src/basic/ |
H A D | string-table.c | 23 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 D | MurmurHash2.c | 37 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 D | device-nodes.c | 39 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 D | strxcpyx.c | 33 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 D | strbuf.h | 28 size_t len; member in struct:strbuf 52 ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len);
|
H A D | barrier.c | 192 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))
|
H A D | strbuf.c | 55 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 D | utf8.c | 106 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...] |
/systemd/src/core/ |
H A D | ima-setup.c | 67 size_t len; local 69 len = strlen(line); 72 if (len > 0 && write(imafd, line, len) < 0)
|
/systemd/src/libsystemd-network/ |
H A D | dhcp6-network.c | 75 const void *packet, size_t len) { 86 r = sendto(s, packet, len, 0, &dest.sa, sizeof(dest.in6)); 74 dhcp6_network_send_udp_socket(int s, struct in6_addr *server_address, const void *packet, size_t len) argument
|
H A D | dhcp-identifier.c | 34 int dhcp_identifier_set_duid_en(struct duid *duid, size_t *len) { argument 40 assert(len); 49 *len = sizeof(duid->type) + sizeof(duid->en);
|
H A D | dhcp-network.c | 88 .len = ELEMENTSOF(filter), 203 const void *packet, size_t len) { 208 assert(len); 210 r = sendto(s, packet, len, 0, &link->sa, sizeof(link->ll)); 218 const void *packet, size_t len) { 228 assert(len); 230 r = sendto(s, packet, len, 0, &dest.sa, sizeof(dest.in)); 202 dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, const void *packet, size_t len) argument 217 dhcp_network_send_udp_socket(int s, be32_t address, uint16_t port, const void *packet, size_t len) argument
|
H A D | dhcp-option.c | 145 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...] |
H A D | dhcp-packet.c | 56 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...] |
/systemd/src/test/ |
H A D | test-siphash24.c | 25 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);
|
/systemd/src/udev/ |
H A D | udev-watch.c | 62 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/journal-remote/ |
H A D | journal-remote-write.c | 23 int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len) { argument 27 iovw->iovec[iovw->count++] = (struct iovec) {data, len};
|
H A D | journal-upload-journal.c | 190 size_t len; local 198 len = c - (const char*)u->field_data; 201 if (size - pos < len + 1) 204 memcpy(buf + pos, u->field_data, len); 205 buf[pos + len] = '\n'; 206 pos += len + 1; 208 u->field_pos = len + 1;
|
/systemd/src/libudev/ |
H A D | libudev.c | 110 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 D | libudev-util.c | 155 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/boot/efi/ |
H A D | pefile.c | 74 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 D | splash.c | 254 EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background) { argument 280 err = bmp_parse_header(content, len, &dib, &map, &pixmap);
|
H A D | util.c | 183 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/journal/ |
H A D | lookup3.c | 277 for (i=0, h=0; i<n; ++i) h = hashlittle( k[i], len[i], h); 853 printf("i %d j %d m %d len %d\n", i, j, m, hlen); 873 uint32_t len; local 930 len = 0xdeadbeef; 932 hashword2(&len, 1, &i, &j); 933 if (hashword(&len, 1, 47) != i) 935 i, hashword(&len, 1, 47)); 942 len = i; 946 ref = hashlittle(b, len, (uint32_t)1); 949 x = hashlittle(b, len, (uint32_ [all...] |
H A D | test-compress.c | 109 size_t csize, usize = 0, len; local 132 len = strlen(data); 134 r = decompress_sw(compressed, csize, (void **) &decompressed, &usize, data, len, '\0'); 136 r = decompress_sw(compressed, csize, (void **) &decompressed, &usize, data, len, 'w'); 140 r = decompress_sw(compressed, csize, (void **) &decompressed, &usize, data, len - 1, data[len-1]); 142 r = decompress_sw(compressed, csize, (void **) &decompressed, &usize, data, len - 1, 'w'); 144 r = decompress_sw(compressed, csize, (void **) &decompressed, &usize, data, len, '\0');
|