/scripts/dtc/ |
D | data.c | 36 while ((d.len + xlen) > newsize) in data_grow_for() 44 struct data data_copy_mem(const char *mem, int len) in data_copy_mem() argument 48 d = data_grow_for(empty_data, len); in data_copy_mem() 50 d.len = len; in data_copy_mem() 51 memcpy(d.val, mem, len); in data_copy_mem() 56 struct data data_copy_escape_string(const char *s, int len) in data_copy_escape_string() argument 63 d = data_grow_for(d, len + 1); in data_copy_escape_string() 66 while (i < len) { in data_copy_escape_string() 72 q[d.len++] = c; in data_copy_escape_string() 75 q[d.len++] = '\0'; in data_copy_escape_string() [all …]
|
D | util.c | 28 int len = strlen(s) + 1; in xstrdup() local 29 char *d = xmalloc(len); in xstrdup() 31 memcpy(d, s, len); in xstrdup() 88 int len; in join_path() local 92 len = lenp + lenn + 2; in join_path() 95 len--; in join_path() 98 str = xmalloc(len); in join_path() 108 bool util_is_printable_string(const void *data, int len) in util_is_printable_string() argument 114 if (len == 0) in util_is_printable_string() 118 if (s[len - 1] != '\0') in util_is_printable_string() [all …]
|
D | util.h | 43 static inline void *xmalloc(size_t len) in xmalloc() argument 45 void *new = malloc(len); in xmalloc() 53 static inline void *xrealloc(void *p, size_t len) in xrealloc() argument 55 void *new = realloc(p, len); in xrealloc() 58 die("realloc() failed (len=%zd)\n", len); in xrealloc() 79 bool util_is_printable_string(const void *data, int len); 97 char *utilfdt_read(const char *filename, size_t *len); 109 int utilfdt_read_err(const char *filename, char **buffp, size_t *len); 179 void utilfdt_print_data(const char *data, int len);
|
D | fdtput.c | 62 int len; /* length of this cell/string/byte */ in encode_value() local 75 for (; arg_count > 0; arg++, arg_count--, upto += len) { in encode_value() 78 len = strlen(*arg) + 1; in encode_value() 80 len = disp->size == -1 ? 4 : disp->size; in encode_value() 83 if (upto + len > value_size) { in encode_value() 84 value_size = (upto + len) + 500; in encode_value() 95 memcpy(ptr, *arg, len); in encode_value() 101 if (len == 4) in encode_value() 121 const char *property, const char *buf, int len) in store_key_value() argument 132 err = fdt_setprop(blob, node, property, buf, len); in store_key_value() [all …]
|
D | treesource.c | 49 static void write_propval_string(FILE *f, const char *s, size_t len) in write_propval_string() argument 51 const char *end = s + len - 1; in write_propval_string() 53 if (!len) in write_propval_string() 102 static void write_propval_int(FILE *f, const char *p, size_t len, size_t width) in write_propval_int() argument 104 const char *end = p + len; in write_propval_int() 105 assert(len % width == 0); in write_propval_int() 165 int len = prop->val.len; in guess_value_type() local 172 for (i = 0; i < len; i++) { in guess_value_type() 186 if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul <= (len-nnul)) in guess_value_type() 189 } else if (((len % sizeof(cell_t)) == 0) && (nnotcelllbl == 0)) { in guess_value_type() [all …]
|
D | fdtget.c | 53 static int show_data(struct display_info *disp, const char *data, int len) in show_data() argument 63 if (len == 0) in show_data() 67 (!disp->type && util_is_printable_string(data, len)); in show_data() 69 if (data[len - 1] != '\0') { in show_data() 73 for (s = data; s - data < len; s += strlen(s) + 1) { in show_data() 82 size = (len % 4) == 0 ? 4 : 1; in show_data() 83 } else if (len % size) { in show_data() 91 for (i = 0; i < len; i += size, p += size) { in show_data() 196 int len, err = 0; in show_data_for_item() local 209 value = fdt_getprop(blob, node, property, &len); in show_data_for_item() [all …]
|
D | yamltree.c | 32 static void yaml_propval_int(yaml_emitter_t *emitter, struct marker *markers, char *data, int len, … in yaml_propval_int() argument 46 assert(len % width == 0); in yaml_propval_int() 52 for (off = 0; off < len; off += width) { in yaml_propval_int() 95 static void yaml_propval_string(yaml_emitter_t *emitter, char *str, int len) in yaml_propval_string() argument 100 assert(str[len-1] == '\0'); in yaml_propval_string() 103 for (i = 0; i < len; i++) in yaml_propval_string() 108 len-1, 0, 1, YAML_DOUBLE_QUOTED_SCALAR_STYLE); in yaml_propval_string() 115 int len = prop->val.len; in yaml_propval() local 125 if (len == 0) { in yaml_propval() 148 chunk_len = type_marker_length(m) ? : len; in yaml_propval() [all …]
|
D | fdtdump.c | 21 static void print_data(const char *data, int len) in print_data() argument 27 if (len == 0) in print_data() 30 if (util_is_printable_string(data, len)) { in print_data() 32 } else if ((len % 4) == 0) { in print_data() 34 for (i = 0; i < len; i += 4) in print_data() 36 i < (len - 4) ? " " : ""); in print_data() 40 for (i = 0; i < len; i++) in print_data() 41 printf("%02x%s", *p++, i < len - 1 ? " " : ""); in print_data()
|
D | flattree.c | 52 static void bin_emit_string(void *e, const char *str, int len) in bin_emit_string() argument 56 if (len == 0) in bin_emit_string() 57 len = strlen(str); in bin_emit_string() 59 *dtbuf = data_append_data(*dtbuf, str, len); in bin_emit_string() 74 *dtbuf = data_append_data(*dtbuf, d.val, d.len); in bin_emit_data() 132 static void asm_emit_string(void *e, const char *str, int len) in asm_emit_string() argument 136 if (len != 0) in asm_emit_string() 137 fprintf(f, "\t.string\t\"%.*s\"\n", len, str); in asm_emit_string() 158 while ((d.len - off) >= sizeof(uint32_t)) { in asm_emit_data() 163 while ((d.len - off) >= 1) { in asm_emit_data() [all …]
|
/scripts/dtc/libfdt/ |
D | fdt_wip.c | 16 int len) in fdt_setprop_inplace_namelen_partial() argument 26 if ((unsigned)proplen < (len + idx)) in fdt_setprop_inplace_namelen_partial() 29 memcpy((char *)propval + idx, val, len); in fdt_setprop_inplace_namelen_partial() 34 const void *val, int len) in fdt_setprop_inplace() argument 43 if (proplen != len) in fdt_setprop_inplace() 48 val, len); in fdt_setprop_inplace() 51 static void fdt_nop_region_(void *start, int len) in fdt_nop_region_() argument 55 for (p = start; (char *)p < ((char *)start + len); p++) in fdt_nop_region_() 62 int len; in fdt_nop_property() local 64 prop = fdt_get_property_w(fdt, nodeoffset, name, &len); in fdt_nop_property() [all …]
|
D | fdt_overlay.c | 31 int len; in overlay_get_target_phandle() local 33 val = fdt_getprop(fdto, fragment, "target", &len); in overlay_get_target_phandle() 37 if ((len != sizeof(*val)) || (fdt32_to_cpu(*val) == (uint32_t)-1)) in overlay_get_target_phandle() 121 int len; in overlay_phandle_add_offset() local 123 val = fdt_getprop(fdt, node, name, &len); in overlay_phandle_add_offset() 125 return len; in overlay_phandle_add_offset() 127 if (len != sizeof(*val)) in overlay_phandle_add_offset() 433 int len; in overlay_fixup_phandle() local 436 &label, &len); in overlay_fixup_phandle() 438 if (len == -FDT_ERR_NOTFOUND) in overlay_fixup_phandle() [all …]
|
D | fdt_ro.c | 14 const char *s, int len) in fdt_nodename_eq_() argument 19 if (!p || olen < len) in fdt_nodename_eq_() 23 if (memcmp(p, s, len) != 0) in fdt_nodename_eq_() 26 if (p[len] == '\0') in fdt_nodename_eq_() 28 else if (!memchr(s, '@', len) && (p[len] == '@')) in fdt_nodename_eq_() 38 size_t len; in fdt_get_string() local 58 len = totalsize - absoffset; in fdt_get_string() 66 if ((fdt_size_dt_strings(fdt) - stroffset) < len) in fdt_get_string() 67 len = fdt_size_dt_strings(fdt) - stroffset; in fdt_get_string() 75 if (sw_stroffset < len) in fdt_get_string() [all …]
|
D | fdt_rw.c | 132 int len = strlen(s) + 1; in fdt_find_add_string_() local 144 err = fdt_splice_string_(fdt, len); in fdt_find_add_string_() 151 memcpy(new, s, len); in fdt_find_add_string_() 185 int len, struct fdt_property **prop) in fdt_resize_property_() argument 195 FDT_TAGALIGN(len)))) in fdt_resize_property_() 198 (*prop)->len = cpu_to_fdt32(len); in fdt_resize_property_() 203 int len, struct fdt_property **prop) in fdt_add_property_() argument 219 proplen = sizeof(**prop) + FDT_TAGALIGN(len); in fdt_add_property_() 231 (*prop)->len = cpu_to_fdt32(len); in fdt_add_property_() 259 int len, void **prop_data) in fdt_setprop_placeholder() argument [all …]
|
D | fdt_sw.c | 94 static void *fdt_grab_space_(void *fdt, size_t len) in fdt_grab_space_() argument 102 if ((offset + len < offset) || (offset + len > spaceleft)) in fdt_grab_space_() 105 fdt_set_size_dt_struct(fdt, offset + len); in fdt_grab_space_() 254 unsigned int len = strlen(s) + 1; in fdt_add_string_() local 257 offset = strtabsize + len; in fdt_add_string_() 262 memcpy(strtab - offset, s, len); in fdt_add_string_() 263 fdt_set_size_dt_strings(fdt, strtabsize + len); in fdt_add_string_() 271 int len = strlen(s) + 1; in fdt_del_last_string_() local 273 fdt_set_size_dt_strings(fdt, strtabsize - len); in fdt_del_last_string_() 293 int fdt_property_placeholder(void *fdt, const char *name, int len, void **valp) in fdt_property_placeholder() argument [all …]
|
D | fdt_addresses.c | 18 int len; in fdt_cells() local 20 c = fdt_getprop(fdt, nodeoffset, name, &len); in fdt_cells() 22 return len; in fdt_cells() 24 if (len != sizeof(*c)) in fdt_cells()
|
D | fdt.c | 135 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len) in fdt_offset_ptr() argument 145 || ((absoffset + len) < absoffset) in fdt_offset_ptr() 146 || (absoffset + len) > fdt_totalsize(fdt)) in fdt_offset_ptr() 150 if (((uoffset + len) < uoffset) in fdt_offset_ptr() 151 || ((offset + len) > fdt_size_dt_struct(fdt))) in fdt_offset_ptr() 305 int len = strlen(s) + 1; in fdt_find_string_() local 306 const char *last = strtab + tabsize - len; in fdt_find_string_() 310 if (memcmp(p, s, len) == 0) in fdt_find_string_()
|
/scripts/ |
D | kallsyms.c | 34 unsigned int len; member 202 unsigned int len; in read_symbol() local 232 len = strlen(name) + 1; in read_symbol() 234 sym = malloc(sizeof(*sym) + len + 1); in read_symbol() 241 sym->len = len; in read_symbol() 357 static int expand_symbol(const unsigned char *data, int len, char *result) in expand_symbol() argument 361 while (len) { in expand_symbol() 375 len--; in expand_symbol() 473 printf("\t.byte 0x%02x", table[i]->len); in write_src() 474 for (k = 0; k < table[i]->len; k++) in write_src() [all …]
|
D | extract-module-sig.pl | 35 my $len = sysread(FD, $buf, $st[7]); 36 die "$modfile" unless (defined($len)); 37 die "Short read on $modfile\n" unless ($len == $st[7]); 40 print STDERR "Read ", $len, " bytes from module file\n"; 43 if ($len < 12 + length($magic_number)); 48 my $p = $len - length($magic_number); 51 die "Magic number not found at $len\n" 53 print STDERR "Found magic number at $len\n";
|
D | extract-sys-certs.pl | 38 my $len = Math::BigInt->new("0x" . $3); 46 len => $len, 110 my $s_len = $sec->{len}; 149 my $len = sysread(FD, $buf, $size); 150 die "$vmlinux" if (!defined($len)); 151 die "Short read on $vmlinux\n" if ($len != $size); 156 $len = syswrite(FD, $buf, $size); 157 die "$keyring" if (!defined($len)); 158 die "Short write on $keyring\n" if ($len != $size);
|
D | jobserver-exec | 43 if len(jobs): 48 claim = len(jobs) + 1 63 if len(jobs):
|
/scripts/kconfig/lxdialog/ |
D | inputbox.c | 36 int show_x, len, pos; in dialog_inputbox() local 88 len = strlen(instr); in dialog_inputbox() 89 pos = len; in dialog_inputbox() 91 if (len >= box_width) { in dialog_inputbox() 92 show_x = len - box_width + 1; in dialog_inputbox() 98 input_x = len; in dialog_inputbox() 125 if (pos < len) { in dialog_inputbox() 126 for (i = pos - 1; i < len; i++) { in dialog_inputbox() 132 len--; in dialog_inputbox() 133 instr[len] = '\0'; in dialog_inputbox() [all …]
|
/scripts/basic/ |
D | fixdep.c | 161 unsigned int len; member 182 static int is_defined_config(const char *name, int len, unsigned int hash) in is_defined_config() argument 187 if (aux->hash == hash && aux->len == len && in is_defined_config() 188 memcmp(aux->name, name, len) == 0) in is_defined_config() 197 static void define_config(const char *name, int len, unsigned int hash) in define_config() argument 199 struct item *aux = malloc(sizeof(*aux) + len); in define_config() 205 memcpy(aux->name, name, len); in define_config() 206 aux->len = len; in define_config() 294 static int is_ignored_file(const char *s, int len) in is_ignored_file() argument 296 return str_ends_with(s, len, "include/generated/autoconf.h") || in is_ignored_file() [all …]
|
/scripts/mod/ |
D | sumversion.c | 170 const unsigned char *data, unsigned int len) in md4_update() argument 174 mctx->byte_count += len; in md4_update() 176 if (avail > len) { in md4_update() 178 data, len); in md4_update() 187 len -= avail; in md4_update() 189 while (len >= sizeof(mctx->block)) { in md4_update() 193 len -= sizeof(mctx->block); in md4_update() 196 memcpy(mctx->block, data, len); in md4_update() 199 static void md4_final_ascii(struct md4_ctx *mctx, char *out, unsigned int len) in md4_final_ascii() argument 221 snprintf(out, len, "%08X%08X%08X%08X", in md4_final_ascii() [all …]
|
/scripts/kconfig/ |
D | nconf.gui.c | 226 int len = get_line_length(line); in fill_window() local 227 strncpy(tmp, line, min(len, x)); in fill_window() 228 tmp[len] = '\0'; in fill_window() 272 int len = get_line_length(line); in btn_dialog() local 273 if (msg_width < len) in btn_dialog() 274 msg_width = len; in btn_dialog() 384 int len = get_line_length(line); in dialog_inputbox() local 385 prompt_width = max(prompt_width, len); in dialog_inputbox() 434 int len = strlen(result); in dialog_inputbox() local 448 len-cursor_position+1); in dialog_inputbox() [all …]
|
/scripts/genksyms/ |
D | keywords.c | 65 static int is_reserved_word(register const char *str, register unsigned int len) in is_reserved_word() argument 71 if (len == l && !memcmp(str, r->name, len)) in is_reserved_word()
|