/coreutils/tests/truncate/ |
D | truncate-parameters.sh | 24 returns_ 1 truncate --size=0 || fail=1 30 returns_ 1 truncate --size=0 --reference=file file || fail=1 36 returns_ 1 truncate --size="invalid" file || fail=1 39 returns_ 1 truncate --size="> -1" file || fail=1 40 truncate --size=" >1" file || fail=1 #file now 1 41 truncate --size=" +1" file || fail=1 #file now 2 45 truncate --size=" +1" -r file file || fail=1 #file now 3
|
D | truncate-relative.sh | 24 returns_ 1 truncate --size="+>0" file || fail=1 27 returns_ 1 truncate --size=">+0" file || fail=1 30 returns_ 1 truncate --size="/0" file || fail=1 33 returns_ 1 truncate --size="%0" file || fail=1
|
/coreutils/src/ |
D | shred.c | 133 off_t size; /* -s flag: size of file */ member 247 fillpattern (int type, unsigned char *r, size_t size) in fillpattern() argument 256 for (i = 3; i <= size / 2; i *= 2) in fillpattern() 258 if (i < size) in fillpattern() 259 memcpy (r + i, r, size - i); in fillpattern() 263 for (i = 0; i < size; i += SECTOR_SIZE) in fillpattern() 377 known (off_t size) in known() argument 379 return 0 <= size; in known() 397 off_t size = *sizep; in dopass() local 426 bool try_without_directio = 0 < size && size < output_size; in dopass() [all …]
|
D | libstdbuf.c | 96 uintmax_t size = 0; in apply_mode() local 106 size = strtoumax (mode, &mode_end, 10); in apply_mode() 107 if (size == 0 || *mode_end) in apply_mode() 114 buf = size <= SIZE_MAX ? malloc (size) : nullptr; in apply_mode() 122 size); in apply_mode() 128 if (setvbuf (stream, buf, setvbuf_mode, size) != 0) in apply_mode()
|
D | make-prime-list.c | 187 size_t size, i; in main() local 206 size = (limit - 1) / 2; in main() 208 sieve = xalloc (size); in main() 209 memset (sieve, 1, size); in main() 211 prime_list = xalloc (size * sizeof (*prime_list)); in main() 214 for (i = 0; i < size;) in main() 221 for (j = (p * p - 3) / 2; j < size; j += p) in main() 224 while (++i < size && sieve[i] == 0) in main()
|
D | od.c | 103 enum size_spec size; /* Type of input object. */ member 635 int size; in ATTRIBUTE_NONNULL() local 655 size = sizeof (char); in ATTRIBUTE_NONNULL() 660 size = sizeof (short int); in ATTRIBUTE_NONNULL() 665 size = sizeof (int); in ATTRIBUTE_NONNULL() 670 size = sizeof (long int); in ATTRIBUTE_NONNULL() 674 if (! simple_strtoi (s, &p, &size)) in ATTRIBUTE_NONNULL() 683 size = sizeof (int); in ATTRIBUTE_NONNULL() 686 if (MAX_INTEGRAL_TYPE_SIZE < size in ATTRIBUTE_NONNULL() 687 || integral_type_size[size] == NO_SIZE) in ATTRIBUTE_NONNULL() [all …]
|
D | uniq.c | 235 uintmax_t size; in size_opt() local 237 switch (xstrtoumax (opt, nullptr, 10, &size, "")) in size_opt() 247 return MIN (size, SIZE_MAX); in size_opt() 259 size_t size = line->length - 1; in find_field() local 262 for (count = 0; count < skip_fields && i < size; count++) in find_field() 264 while (i < size && field_sep (lp[i])) in find_field() 266 while (i < size && !field_sep (lp[i])) in find_field() 270 i += MIN (skip_chars, size - i); in find_field() 532 uintmax_t size; in main() local 535 && xstrtoumax (optarg, nullptr, 10, &size, "") == LONGINT_OK in main() [all …]
|
D | iopoll.c | 224 fwrite_wait (char const *buf, ssize_t size, FILE *f) in fwrite_wait() argument 228 const size_t written = fwrite (buf, 1, size, f); in fwrite_wait() 229 size -= written; in fwrite_wait() 230 affirm (size >= 0); in fwrite_wait() 231 if (size <= 0) /* everything written */ in fwrite_wait()
|
D | stdbuf.c | 42 size_t size; member 64 parse_size (char const *str, size_t *size) in parse_size() argument 75 *size = tmp_size; in parse_size() 292 stdbuf[i].size); in set_libstdbuf_options() 348 && parse_size (optarg, &stdbuf[opt_fileno].size) == -1) in main()
|
D | truncate.c | 202 off_t size IF_LINT ( = 0); in main() 269 size = xdectoimax (optarg, OFF_T_MIN, OFF_T_MAX, "EgGkKmMPQRtTYZ0", in main() 272 if ((rel_mode == rm_rup || rel_mode == rm_rdn) && size == 0) in main() 346 size = file_size; in main() 372 errors |= !do_ftruncate (fd, fname, size, rsize, rel_mode); in main()
|
D | dd.c | 253 static ssize_t (*iread_fnc) (int fd, char *buf, idx_t size); 1104 iread (int fd, char *buf, idx_t size) in iread() argument 1112 nread = read (fd, buf, size); in iread() 1116 && 0 < prev_nread && prev_nread < size in iread() 1126 if (0 < nread && nread < size) in iread() 1131 if (0 < prev_nread && prev_nread < size) in iread() 1151 iread_fullblock (int fd, char *buf, idx_t size) in iread_fullblock() argument 1155 while (0 < size) in iread_fullblock() 1157 ssize_t ncurr = iread (fd, buf, size); in iread_fullblock() 1164 size -= ncurr; in iread_fullblock() [all …]
|
D | du.c | 78 uintmax_t size; member 92 a->size = 0; in duinfo_init() 100 duinfo_set (struct duinfo *a, uintmax_t size, struct timespec tmax) in duinfo_set() argument 102 a->size = size; in duinfo_set() 111 uintmax_t sum = a->size + b->size; in duinfo_add() 112 a->size = a->size <= sum ? sum : UINTMAX_MAX; in duinfo_add() 412 : pdui->size); in print_size() 661 uintmax_t v = opt_inodes ? dui_to_print.inodes : dui_to_print.size; in process_file()
|
/coreutils/gl/lib/ |
D | randread.c | 233 readsource (struct randread_source *s, unsigned char *p, size_t size) in readsource() argument 237 size_t inbytes = fread (p, sizeof *p, size, s->source); in readsource() 240 size -= inbytes; in readsource() 241 if (size == 0) in readsource() 253 readisaac (struct isaac *isaac, void *p, size_t size) in readisaac() argument 261 if (size <= inbytes) in readisaac() 263 memcpy (p, isaac->data.b + ISAAC_BYTES - inbytes, size); in readisaac() 264 isaac->buffered = inbytes - size; in readisaac() 270 size -= inbytes; in readisaac() 277 while (ISAAC_BYTES <= size) in readisaac() [all …]
|
D | buffer-lcm.c | 30 size_t size; in buffer_lcm() local 34 size = b ? b : 8 * 1024; in buffer_lcm() 55 size = a; in buffer_lcm() 58 return size <= lcm_max ? size : lcm_max; in buffer_lcm()
|
/coreutils/tests/misc/ |
D | yes.sh | 29 for size in 1 1999 4095 4096 8191 8192 16383 16384; do 30 printf "%${size}s\n" '' > out.1 31 yes "$(printf %${size}s '')" | head -n2 | uniq > out.2 52 for size in 1 16384; do 53 returns_ 1 yes "$(printf %${size}s '')" >/dev/full 2>errt || fail=1
|
/coreutils/tests/csplit/ |
D | csplit-io-err.sh | 40 fwrite (const void *ptr, size_t size, size_t nitems, FILE *stream) 46 size_t count = size * nitems; 51 return i / size; 62 fwrite_unlocked (const void *ptr, size_t size, size_t nitems, FILE *stream) 64 return fwrite (ptr, size, nitems, stream);
|
/coreutils/tests/shred/ |
D | shred-passes.sh | 86 for size in 1 2 6 7 8; do 87 touch shred.pattern.umr.size 88 shred -n4 -s$size shred.pattern.umr.size || fail=1
|
/coreutils/tests/sort/ |
D | sort-merge-fdlimit.sh | 39 && sort -m --batch-size=16 in/* 2>err/merge-default-err \ 48 && sort -mR $randsource --batch-size=16 in/* 2>err/merge-random-err \ 75 sort -n -m --batch-size=7 -o out out in/1 in/2 in/3 in/4 in/5 out
|
/coreutils/tests/du/ |
D | basic.sh | 34 du --block-size=$B -a a > out || fail=1 36 du --block-size=$B -a -S a >> out || fail=1 38 du --block-size=$B -s a >> out || fail=1 66 du --block-size=$B -a d | sort -r -k2,2 > out || fail=1 68 du --block-size=$B -S d | sort -r -k2,2 >> out || fail=1
|
D | 8gb.sh | 37 size=$4 38 if test "$size" = 0; then
|
D | deref-args.sh | 37 du --apparent-size --block-size=1K -D slink-to-64k >> out
|
/coreutils/man/ |
D | truncate.x | 2 truncate \- shrink or extend the size of a file to the specified size
|
/coreutils/tests/split/ |
D | l-chunk.sh | 85 size=$(printf "%s" "$lines" | wc -c) 86 chunk_size=$(($size/$N)) 87 end_size=$(($chunk_size + ($size % $N))) 91 } | tr -d '\n' | sed "s/\\(^.\\{1,$size\\}\\).*/\\1/"
|
/coreutils/tests/ls/ |
D | getxattr-speedup.sh | 44 ssize_t getxattr (const char *path, const char *name, void *value, size_t size) 46 ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size)
|
D | block-size.sh | 28 for size in 1024 4096 262144; do 29 echo foo | dd conv=sync bs=$size >file$size || fail=1 45 ls -og -k --block-size=$blocksize *
|