| 447 | /* Print size (and optionally time) indicated by *PDUI, followed by STRING. */ |
| 448 | |
| 449 | static void |
| 450 | print_size (const struct duinfo *pdui, char const *string) |
| 451 | { |
| 452 | print_only_size (opt_inodes |
| 453 | ? pdui->inodes |
| 454 | : pdui->size); |
| 455 | |
| 456 | if (opt_time) |
| 457 | { |
| 458 | putchar ('\t'); |
| 459 | bool ok = show_date (time_format, pdui->tmax, localtz); |
| 460 | if (!ok) |
| 461 | { |
| 462 | /* If failed to format date, print raw seconds instead. */ |
| 463 | char buf[INT_BUFSIZE_BOUND (intmax_t)]; |
| 464 | fputs (timetostr (pdui->tmax.tv_sec, buf), stdout); |
| 465 | } |
| 466 | } |
| 467 | putchar ('\t'); |
| 468 | fputs (string, stdout); |
| 469 | putchar (opt_nul_terminate_output ? '\0' : '\n'); |
| 470 | if (fflush (stdout) < 0) |
| 471 | write_error (); |
| 472 | } |
| 473 | |
| 474 | /* Fill the di_mnt set with local mount point dev/ino pairs. */ |
| 475 |
no test coverage detected