Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 97) sorted by relevance

1234

/busybox-1.35.0/coreutils/
Dhead.c55 # define print_first_N(fp,count,bytes) print_first_N(fp,count) argument
58 print_first_N(FILE *fp, unsigned long count, bool count_bytes) in print_first_N() argument
63 while (count) { in print_first_N()
68 --count; in print_first_N()
75 print_except_N_last_bytes(FILE *fp, unsigned count) in print_except_N_last_bytes() argument
77 unsigned char *circle = xmalloc(++count); in print_except_N_last_bytes()
85 if (head == count) in print_except_N_last_bytes()
90 if (head == count) in print_except_N_last_bytes()
104 print_except_N_last_lines(FILE *fp, unsigned count) in print_except_N_last_lines() argument
106 char **circle = xzalloc((++count) * sizeof(circle[0])); in print_except_N_last_lines()
[all …]
Dnproc.c33 int count = 0; in nproc_main() local
49 count++; in nproc_main()
61 count++; in nproc_main()
67 IF_LONG_OPTS(count -= ignore;) in nproc_main()
68 if (count <= 0) in nproc_main()
69 count = 1; in nproc_main()
71 printf("%u\n", count); in nproc_main()
Dtail.c87 static ssize_t tail_read(int fd, char *buf, size_t count) in tail_read() argument
91 r = full_read(fd, buf, count); in tail_read()
116 unsigned count = 10; in tail_main() local
137 count = eat_num(argv[1]); in tail_main()
152 if (opt & 0x2) count = eat_num(str_c); // -c in tail_main()
153 if (opt & 0x4) count = eat_num(str_n); // -n in tail_main()
195 if (tailbufsize < count + BUFSIZ) { in tail_main()
196 tailbufsize = count + BUFSIZ; in tail_main()
232 if (count == 0) in tail_main()
234 current -= count; in tail_main()
[all …]
/busybox-1.35.0/libbb/
Dmtab.c16 int i, count; in erase_mtab() local
29 count = 0; in erase_mtab()
31 entries = xrealloc_vector(entries, 3, count); in erase_mtab()
32 entries[count].mnt_fsname = xstrdup(m->mnt_fsname); in erase_mtab()
33 entries[count].mnt_dir = xstrdup(m->mnt_dir); in erase_mtab()
34 entries[count].mnt_type = xstrdup(m->mnt_type); in erase_mtab()
35 entries[count].mnt_opts = xstrdup(m->mnt_opts); in erase_mtab()
36 entries[count].mnt_freq = m->mnt_freq; in erase_mtab()
37 entries[count].mnt_passno = m->mnt_passno; in erase_mtab()
38 count++; in erase_mtab()
[all …]
Dreplace.c16 unsigned count = 0; in count_strstr() local
23 count++; in count_strstr()
26 return count; in count_strstr()
29 char* FAST_FUNC xmalloc_substitute_string(const char *src, int count, const char *sub, const char *… in xmalloc_substitute_string() argument
37 buf = dst = xmalloc(strlen(src) + count * ((int)repl_len - (int)sub_len) + 1); in xmalloc_substitute_string()
Dbb_qsort.c16 void FAST_FUNC qsort_string_vector(char **sv, unsigned count) in qsort_string_vector() argument
18 qsort(sv, count, sizeof(char*), bb_pstrcmp); in qsort_string_vector()
Dsafe_write.c11 ssize_t FAST_FUNC safe_write(int fd, const void *buf, size_t count) in safe_write() argument
16 n = write(fd, buf, count); in safe_write()
Dread_printf.c48 ssize_t FAST_FUNC nonblock_immune_read(int fd, void *buf, size_t count) in nonblock_immune_read() argument
54 n = safe_read(fd, buf, count); in nonblock_immune_read()
215 void FAST_FUNC xread(int fd, void *buf, size_t count) in xread() argument
217 if (count) { in xread()
218 ssize_t size = full_read(fd, buf, count); in xread()
219 if ((size_t)size != count) in xread()
/busybox-1.35.0/miscutils/
Dflashcp.c37 static void progress(int mode, uoff_t count, uoff_t total) in progress() argument
43 percent = count * 100; in progress()
48 count, total, (unsigned)percent); in progress()
128 unsigned count; in flashcp_main() local
133 count = BUFSIZE; in flashcp_main()
142 count = rem; in flashcp_main()
143 xread(fd_f, buf, count); in flashcp_main()
146 if (count < BUFSIZE) in flashcp_main()
147 memset((char*)buf + count, 0, BUFSIZE - count); in flashcp_main()
156 xread(fd_d, buf2, count); in flashcp_main()
[all …]
Dstrings.c44 unsigned count; in strings_main() local
80 count = 0; in strings_main()
84 if (count > n) { in strings_main()
87 string[count] = c; in strings_main()
88 if (count == n) { in strings_main()
97 count++; in strings_main()
100 if (count > n) { in strings_main()
103 count = 0; in strings_main()
Dmakedevs.c207 unsigned count = 0; in makedevs_main() local
221 &major, &minor, &start, &increment, &count)) in makedevs_main()
222 || ((unsigned)(major | minor | start | count | increment) > 255) in makedevs_main()
278 if (count != 0) in makedevs_main()
279 count--; in makedevs_main()
280 for (i = 0; i <= count; i++) { in makedevs_main()
283 if (count != 0) in makedevs_main()
298 if (count != 0) in makedevs_main()
Ddevfsd.c413 int fd, proto_rev, count; in devfsd_main() local
421 for (count = 2; count < argc; ++count) { in devfsd_main()
422 if (argv[count][0] == '-') { in devfsd_main()
423 if (argv[count][1] == 'v' && !argv[count][2]) /* -v */ in devfsd_main()
425 else if (ENABLE_DEVFSD_FG_NP && argv[count][1] == 'f' in devfsd_main()
426 && argv[count][2] == 'g' && !argv[count][3]) /* -fg */ in devfsd_main()
428 else if (ENABLE_DEVFSD_FG_NP && argv[count][1] == 'n' in devfsd_main()
429 && argv[count][2] == 'p' && !argv[count][3]) /* -np */ in devfsd_main()
562 int num_args, count; in process_config_line() local
578 for (count = 0; count < MAX_ARGS; ++count) in process_config_line()
[all …]
/busybox-1.35.0/util-linux/
Dscript.c138 int outfd, count, loop; in script_main() local
165 count = safe_read(pty, buf, COMMON_BUFSIZE); in script_main()
166 if (count <= 0 && errno != EAGAIN) { in script_main()
170 if (count > 0) { in script_main()
177 fprintf(timing_fp, "%f %u\n", newtime - oldtime, count); in script_main()
180 full_write(STDOUT_FILENO, buf, count); in script_main()
181 full_write(outfd, buf, count); in script_main()
189 count = safe_read(STDIN_FILENO, buf, COMMON_BUFSIZE); in script_main()
190 if (count <= 0) { in script_main()
195 full_write(pty, buf, count); in script_main()
[all …]
Dscriptreplay.c33 unsigned long count; in scriptreplay_main() local
47 while (fscanf(tfp, "%lf %lu\n", &delay, &count) == 2) { in scriptreplay_main()
49 bb_copyfd_exact_size(fd, STDOUT_FILENO, count); in scriptreplay_main()
Dmkfs_ext2.txt22 Inode count: 42624 Inode count: 4…
23 Block count: 169951 Block count: 1…
24 Reserved block count: 8497 Reserved block count: 8…
38 Mount count: 0 Mount count: 0
39 Maximum mount count: 20 Maximum mount count: 37
/busybox-1.35.0/networking/
Dtelnetd.c376 static size_t safe_write_double_iac(int fd, const char *buf, size_t count) in safe_write_double_iac() argument
383 if (count == 0) in safe_write_double_iac()
393 count--; in safe_write_double_iac()
397 IACptr = memchr(buf, IAC, count); in safe_write_double_iac()
398 wr = count; in safe_write_double_iac()
406 count -= rc; in safe_write_double_iac()
665 int count; in telnetd_main() local
802 count = select(G.maxfd + 1, &rdfdset, &wrfdset, NULL, tv_ptr); in telnetd_main()
804 if (count == 0) /* "telnetd -w SEC" timed out */ in telnetd_main()
806 if (count < 0) in telnetd_main()
[all …]
Dhttpd_post_upload.cgi47 dd if="$file" skip=$((filesize - tail_len)) bs=1 count=1000 >"$file.tail" 2>/dev/null
57 dd of="$file" seek=$((filesize - tail_len)) bs=1 count=0 >/dev/null 2>/dev/null
Dhttpd.c1308 unsigned count; in get_line() local
1311 count = 0; in get_line()
1326 iobuf[count] = c; in get_line()
1327 if (count < (IOBUF_SIZE - 1)) /* check overflow */ in get_line()
1328 count++; in get_line()
1331 iobuf[count] = '\0'; in get_line()
1332 return count; in get_line()
1344 int count; in cgi_io_loop_and_exit() local
1402 count = safe_poll(pfd, hdr_cnt > 0 ? TO_CGI+1 : FROM_CGI+1, -1); in cgi_io_loop_and_exit()
1403 if (count <= 0) { in cgi_io_loop_and_exit()
[all …]
/busybox-1.35.0/util-linux/volume_id/
Dutil.c23 …me_id_set_unicode16(char *str, size_t len, const uint8_t *buf, enum endian endianess, size_t count) in volume_id_set_unicode16() argument
29 for (i = 0; i + 2 <= count; i += 2) { in volume_id_set_unicode16()
97 void volume_id_set_label_raw(struct volume_id *id, const uint8_t *buf, size_t count) in volume_id_set_label_raw() argument
99 memcpy(id->label_raw, buf, count); in volume_id_set_label_raw()
100 id->label_raw_len = count; in volume_id_set_label_raw()
115 void volume_id_set_label_string(struct volume_id *id, const uint8_t *buf, size_t count) in volume_id_set_label_string() argument
119 memcpy(id->label, buf, count); in volume_id_set_label_string()
122 i = strnlen(id->label, count); in volume_id_set_label_string()
130 …_set_label_unicode16(struct volume_id *id, const uint8_t *buf, enum endian endianess, size_t count) in volume_id_set_label_unicode16() argument
132 volume_id_set_unicode16(id->label, sizeof(id->label), buf, endianess, count); in volume_id_set_label_unicode16()
[all …]
Dexfat.c82 unsigned count; in volume_id_probe_exfat() local
114 for (count = 0; count < EXFAT_MAX_DIR_ENTRIES; count++) { in volume_id_probe_exfat()
115 de = volume_id_get_buffer(id, root_dir_off + (count * EXFAT_DIR_ENTRY_SZ), EXFAT_DIR_ENTRY_SZ); in volume_id_probe_exfat()
120 dbg("exFAT: End of root directory reached after %u entries", count); in volume_id_probe_exfat()
/busybox-1.35.0/procps/
Dpowertop.c60 int count; member
68 ullong count; member
146 G.lines_cumulative_count += G.lines[i].count; in update_lines_cumulative_count()
153 return (b->count /*+ 50 * b->disk_count*/) - (a->count /*+ 50 * a->disk_count*/); in line_compare()
219 static void save_line(const char *string, int count) in save_line() argument
225 G.lines[i].count += count; in save_line()
233 G.lines[G.lines_cnt].count = count; in save_line()
287 static int save_irq_count(int irq, ullong count) in save_irq_count() argument
293 ullong old = G.interrupts[i].count; in save_irq_count()
294 G.interrupts[i].count = count; in save_irq_count()
[all …]
/busybox-1.35.0/archival/
Dbzip2.c168 ssize_t count; in IF_DESKTOP() local
190 count = full_read(STDIN_FILENO, rbuf, IOBUF_SIZE); in IF_DESKTOP()
191 if (count < 0) { in IF_DESKTOP()
197 total = bz_write(strm, rbuf, count, wbuf); in IF_DESKTOP()
198 if (count == 0 || total < 0) in IF_DESKTOP()
Drpm.c79 uint32_t count; /* 4 byte count */ member
130 tag->count = ntohl(tag->count); in rpm_gettags()
168 if (!found || itemindex >= found->count) in rpm_getstr()
197 if (!found || itemindex >= found->count) in rpm_getint()
222 return found->count; in rpm_getcount()
255 int count = 0; in loop_through_files() local
256 while (rpm_getstr(filetag, count)) { in loop_through_files()
258 rpm_getstr(TAG_DIRNAMES, rpm_getint(TAG_DIRINDEXES, count)), in loop_through_files()
259 rpm_getstr(TAG_BASENAMES, count)); in loop_through_files()
260 fileaction(filename, count++); in loop_through_files()
[all …]
/busybox-1.35.0/examples/
Ddevfsd.conf104 LOOKUP ^(sd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count
106 LOOKUP ^(sd[a-z]+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
108 … ^(ide/hd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
110 LOOKUP ^(hd[a-z])[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
114 LOOKUP ^(scd+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
/busybox-1.35.0/testsuite/du/
Ddu-l-works5 dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null
7 dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null

1234