Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 182) sorted by relevance

12345678

/busybox-1.35.0/testsuite/
Dbc_references.bc1 define printarray(a[], len) {
5 for (i = 0; i < len; ++i) {
10 define a2(a[], len) {
14 for (i = 0; i < len; ++i) {
18 printarray(a[], len)
21 define a4(a__[], len) {
25 for (i = 0; i < len; ++i) {
29 printarray(a__[], len)
32 define a6(*a__[], len) {
36 for (i = 0; i < len; ++i) {
[all …]
/busybox-1.35.0/util-linux/
Ddmesg.c63 int len, level; in dmesg_main() local
73 opts = getopt32(argv, "cs:+n:+r", &len, &level); in dmesg_main()
81 len = klogctl(10, NULL, 0); /* read ring buffer size */ in dmesg_main()
82 if (len < 16*1024) in dmesg_main()
83 len = 16*1024; in dmesg_main()
84 if (len > 16*1024*1024) in dmesg_main()
85 len = 16*1024*1024; in dmesg_main()
87 buf = xmalloc(len); in dmesg_main()
88 len = klogctl(3 + (opts & OPT_c), buf, len); /* read ring buffer */ in dmesg_main()
89 if (len < 0) in dmesg_main()
[all …]
Drev.c34 static void strrev(CHAR_T *s, int len) in strrev() argument
38 if (len != 0) { in strrev()
39 len--; in strrev()
40 if (len != 0 && s[len] == '\n') in strrev()
41 len--; in strrev()
44 for (i = 0; i < len; i++, len--) { in strrev()
46 s[i] = s[len]; in strrev()
47 s[len] = c; in strrev()
100 int len = mbstowcs(tmp, buf, bufsize); in rev_main() local
101 if (len >= 0) { in rev_main()
[all …]
Dmore.c111 int len; in more_main() local
126 len = 0; in more_main()
139 len = printf("--More-- "); in more_main()
144 len += printf("(%u%% of %"OFF_FMT"u bytes)", in more_main()
158 printf("\r%*s\r", len, ""); in more_main()
169 len = printf("(Enter:next line Space:next page Q:quit R:show the rest)"); in more_main()
171 len = 0; in more_main()
183 spaces = ((unsigned)~len) % CONVERTED_TAB_SIZE; in more_main()
197 wrap = (++len > G.terminal_width); in more_main()
203 len = 0; in more_main()
/busybox-1.35.0/libbb/
Dtrim.c14 size_t len = strlen(s); in trim() local
15 size_t old = len; in trim()
18 while (len && isspace(s[len-1])) in trim()
19 --len; in trim()
22 if (len) { in trim()
25 len -= (nws - s); in trim()
26 memmove(s, nws, len); in trim()
30 s += len; in trim()
33 if (old != len) in trim()
Dparse_config.c106 ssize_t len, nlen; in get_line_with_continuation() local
109 len = getline(&parser->line, &parser->line_alloc, parser->fp); in get_line_with_continuation()
110 if (len <= 0) in get_line_with_continuation()
111 return len; in get_line_with_continuation()
116 if (line[len - 1] == '\n') in get_line_with_continuation()
117 len--; in get_line_with_continuation()
118 if (len == 0 || line[len - 1] != '\\') in get_line_with_continuation()
120 len--; in get_line_with_continuation()
126 if (parser->line_alloc < len + nlen + 1) { in get_line_with_continuation()
127 parser->line_alloc = len + nlen + 1; in get_line_with_continuation()
[all …]
Dfull_write.c17 ssize_t FAST_FUNC full_write(int fd, const void *buf, size_t len) in full_write() argument
24 while (len) { in full_write()
25 cc = safe_write(fd, buf, len); in full_write()
38 len -= cc; in full_write()
Dduration.c40 int len; in parse_duration_str() local
50 len = strspn(str, "0123456789."); in parse_duration_str()
51 sv = str[len]; in parse_duration_str()
52 str[len] = '\0'; in parse_duration_str()
57 str += len; in parse_duration_str()
/busybox-1.35.0/networking/ssl_helper/
Dssl_helper.c67 static ssize_t full_write(int fd, const void *buf, size_t len) in full_write() argument
74 while (len) { in full_write()
75 cc = safe_write(fd, buf, len); in full_write()
88 len -= cc; in full_write()
159 int len; in close_conn_and_exit() local
164 len = matrixSslGetOutdata(ssl, &buf); in close_conn_and_exit()
165 if (len > 0) { in close_conn_and_exit()
166 len = safe_write(fd, buf, len); in close_conn_and_exit()
177 static int encode_data(ssl_t *ssl, const void *data, int len) in encode_data() argument
182 available = matrixSslGetWritebuf(ssl, &buf, len); in encode_data()
[all …]
/busybox-1.35.0/networking/udhcp/
Ddomain_codec.c39 unsigned len, crtpos, retpos, depth; in dname_dec() local
42 len = strlen(pre); in dname_dec()
63 ret = xrealloc(ret, len + *c + 1); in dname_dec()
65 end = (char *)mempcpy(ret + len, c + 1, *c); in dname_dec()
69 len += label_len; in dname_dec()
82 if (len != 0) { in dname_dec()
86 ret[len - 1] = ' '; in dname_dec()
91 || len > NS_MAXDNAME * NS_MAXDNSRCH /* result too long? abort */ in dname_dec()
121 int len; in convert_dname() local
125 len = dst - lenptr - 1; in convert_dname()
[all …]
/busybox-1.35.0/selinux/
Dgetsebool.c30 int i, rc = 0, active, pending, len = 0; in getsebool_main() local
41 rc = security_get_boolean_names(&names, &len); in getsebool_main()
45 if (!len) { in getsebool_main()
51 if (!len) { in getsebool_main()
54 len = argc - 1; in getsebool_main()
55 names = xmalloc(sizeof(char *) * len); in getsebool_main()
56 for (i = 0; i < len; i++) in getsebool_main()
60 for (i = 0; i < len; i++) { in getsebool_main()
76 for (i = 0; i < len; i++) in getsebool_main()
/busybox-1.35.0/coreutils/
Dexpand.c111 unsigned len = 0; // in expand() local
114 len += unicode_strwidth(ptr_strbeg); in expand()
116 len += ptr - ptr_strbeg; in expand()
118 len = tab_size - (len % tab_size); in expand()
120 printf("%s%*s", ptr_strbeg, len, ""); in expand()
143 unsigned len = 0; in unexpand() local
147 len++; in unexpand()
149 column += len; in unexpand()
158 len = column = column % tab_size; in unexpand()
164 printf("%*s%s", len, "", ptr); in unexpand()
[all …]
Ddate.c212 int len = strspn(date_str, "0123456789"); in date_main() local
213 if (date_str[len] == '\0' in date_main()
214 || (date_str[len] == '.' in date_main()
215 && isdigit(date_str[len+1]) in date_main()
216 && isdigit(date_str[len+2]) in date_main()
217 && date_str[len+3] == '\0' in date_main()
224 len -= 8; in date_main()
225 if (len < 0 || len > 4 || (len & 1)) in date_main()
227 if (len != 0) { /* move YY or CCYY to front */ in date_main()
229 memcpy(buf, date_str + 8, len); in date_main()
[all …]
/busybox-1.35.0/networking/
Dtls.c293 static void dump_hex(const char *fmt, const void *vp, int len) in dump_hex() argument
298 bin2hex(hexbuf, (void*)p, len)[0] = '\0'; in dump_hex()
302 static void dump_tls_record(const void *vp, int len) in dump_tls_record() argument
306 while (len > 0) { in dump_tls_record()
308 if (len < RECHDR_LEN) { in dump_tls_record()
309 dump_hex("< |%s|\n", p, len); in dump_tls_record()
315 len -= RECHDR_LEN; in dump_tls_record()
316 if (len >= 4 && p[-RECHDR_LEN] == RECORD_TYPE_HANDSHAKE) { in dump_tls_record()
320 if (xhdr_len > len) in dump_tls_record()
321 xhdr_len = len; in dump_tls_record()
[all …]
Dwhois.c59 unsigned len; in query() local
61 len = strcspn(linebuf, "\r\n"); in query()
62 linebuf[len++] = '\n'; in query()
63 linebuf[len] = '\0'; in query()
65 buf = xrealloc(buf, bufpos + len + 1); in query()
66 memcpy(buf + bufpos, linebuf, len); in query()
67 bufpos += len; in query()
Dtftp.c258 static char *tftp_get_option(const char *option, char *buf, int len) in tftp_get_option() argument
267 while (len > 0) { in tftp_get_option()
269 for (k = 0; k < len; k++) { in tftp_get_option()
286 len -= k; in tftp_get_option()
314 int len; variable
344 xbind(socket_fd, &our_lsa->u.sa, our_lsa->len);
345 xconnect(socket_fd, &peer_lsa->u.sa, peer_lsa->len);
458 len = strlen(remote_file);
459 if (len + 3 + sizeof("octet") >= io_bufsize) {
526 len = full_read(local_fd, cp, blksize);
[all …]
/busybox-1.35.0/miscutils/
Dinotifyd.c153 int len; in inotifyd_main() local
177 xioctl(pfd.fd, FIONREAD, &len); in inotifyd_main()
178 ie = buf = (len <= COMMON_BUFSIZE) ? eventbuf : xmalloc(len); in inotifyd_main()
179 len = full_read(pfd.fd, buf, len); in inotifyd_main()
181 while (len > 0) { in inotifyd_main()
195 printf(ie->len ? "%s\t%s\t%s\n" : "%s\t%s\n", events, in inotifyd_main()
204 args[3] = ie->len ? ie->name : NULL; in inotifyd_main()
215 i = sizeof(struct inotify_event) + ie->len; in inotifyd_main()
216 len -= i; in inotifyd_main()
Dchat.c263 size_t len = strlen(arg); in chat_main() local
264 if (len > max_abort_len) in chat_main()
265 max_abort_len = len; in chat_main()
278 size_t len = strlen(l->data); in chat_main() local
285 if (len > max_abort_len) in chat_main()
286 max_abort_len = len; in chat_main()
405 size_t len = strlen(l->data); in chat_main() local
406 delta = buf_len - len; in chat_main()
407 if (delta >= 0 && !memcmp(inbuf + delta, l->data, len)) in chat_main()
452 size_t len; in chat_main() local
[all …]
/busybox-1.35.0/networking/ssl_helper-wolfssl/
Dssl_helper.c55 static ssize_t full_write(int fd, const void *buf, size_t len) in full_write() argument
62 while (len) { in full_write()
63 cc = safe_write(fd, buf, len); in full_write()
76 len -= cc; in full_write()
380 int len; in do_io_until_eof_and_exit() local
386 len = 0; /* only to suppress compiler warning */ in do_io_until_eof_and_exit()
392 len = read(STDIN_FILENO, ibuf, sizeof(ibuf)); in do_io_until_eof_and_exit()
393 if (len < 0) in do_io_until_eof_and_exit()
395 if (len == 0) { in do_io_until_eof_and_exit()
399 int n = wolfSSL_write(ssl, ibuf, len); in do_io_until_eof_and_exit()
[all …]
/busybox-1.35.0/networking/libiproute/
Dlibnetlink.c57 int FAST_FUNC rtnl_send_check(struct rtnl_handle *rth, const void *buf, int len) in rtnl_send_check() argument
63 status = write(rth->fd, buf, len); in rtnl_send_check()
92 int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len) in rtnl_dump_request() argument
99 struct iovec iov[2] = { { &s.nlh, sizeof(s.nlh) }, { req, len } }; in rtnl_dump_request()
113 s.nlh.nlmsg_len = NLMSG_LENGTH(len); in rtnl_dump_request()
295 int len = h->nlmsg_len; in rtnl_talk() local
296 int l = len - sizeof(*h); in rtnl_talk()
298 if (l < 0 || len > status) { in rtnl_talk()
303 bb_error_msg_and_die("malformed message: len=%d!", len); in rtnl_talk()
343 status -= NLMSG_ALIGN(len); in rtnl_talk()
[all …]
/busybox-1.35.0/util-linux/volume_id/
Dutil.c23 void volume_id_set_unicode16(char *str, size_t len, const uint8_t *buf, enum endian endianess, size… in volume_id_set_unicode16() argument
36 if (j+1 >= len) in volume_id_set_unicode16()
42 if (j+2 >= len) in volume_id_set_unicode16()
47 if (j+3 >= len) in volume_id_set_unicode16()
179 void *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len) in volume_id_get_buffer() argument
186 (unsigned long long) off, (unsigned long long) off, len); in volume_id_get_buffer()
189 if (off + len <= SB_BUFFER_SIZE in volume_id_get_buffer()
199 len += off; in volume_id_get_buffer()
200 if (len <= id->sbbuf_len) in volume_id_get_buffer()
203 dbg("read sbbuf len:0x%x", (unsigned) len); in volume_id_get_buffer()
[all …]
/busybox-1.35.0/scripts/basic/
Dfixdep.c152 void grow_config(int len) in grow_config() argument
154 while (len_config + len > size_config) { in grow_config()
168 int is_defined_config(const char * name, int len) in is_defined_config() argument
171 const char * plast = str_config + len_config - len; in is_defined_config()
174 && pconfig[len] == '\n' in is_defined_config()
175 && !memcmp(pconfig, name, len)) in is_defined_config()
184 void define_config(const char * name, int len) in define_config() argument
186 grow_config(len + 1); in define_config()
188 memcpy(str_config+len_config, name, len); in define_config()
189 len_config += len; in define_config()
[all …]
/busybox-1.35.0/editors/
Ded.c30 int len; member
130 static int findString(const LINE *lp, const char *str, int len, int offset) in findString() argument
136 left = lp->len - offset - len; in findString()
144 if (memcmp(cp, str, len) == 0) in findString()
163 int len; in searchLines() local
179 len = strlen(str); in searchLines()
186 if (findString(lp, str, len, 0) >= 0) in searchLines()
314 static int insertLine(int num, const char *data, int len) in insertLine() argument
323 newLp = xmalloc(sizeof(LINE) + len - 1); in insertLine()
325 memcpy(newLp->data, data, len); in insertLine()
[all …]
/busybox-1.35.0/shell/ash_test/
Dprintenv.c39 int len; local
53 len = strlen (*argv);
56 if (**argv == **envp && strncmp (*envp, *argv, len) == 0)
58 eval = *envp + len;
/busybox-1.35.0/console-tools/
Dloadfont.c270 static void do_load(int fd, unsigned char *buffer, size_t len) in do_load() argument
280 if (len >= sizeof(struct psf1_header) && PSF1_MAGIC_OK(psf1h(buffer))) { in do_load()
291 if (len >= sizeof(struct psf2_header) && PSF2_MAGIC_OK(psf2h(buffer))) { in do_load()
304 if (len == 9780) { /* file with three code pages? */ in do_load()
307 } else if ((len & 0377) == 0) { /* bare font */ in do_load()
308 charsize = height = len / 256; in do_load()
321 buffer += len; in do_load()
345 size_t len; in loadfont_main() local
358 len = 128*1024; in loadfont_main()
359 buffer = xmalloc_read(STDIN_FILENO, &len); in loadfont_main()
[all …]

12345678