MCPcopy Create free account
hub / github.com/coreutils/coreutils / df_readable

Function df_readable

src/df.c:866–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864 - Otherwise, return "-" if N is unknown. */
865
866static char const *
867df_readable (bool negative, uintmax_t n, char *buf,
868 uintmax_t input_units, uintmax_t output_units)
869{
870 if (! known_value (n) && !negative)
871 return "-";
872 else
873 {
874 char *p = human_readable (negative ? -n : n, buf + negative,
875 human_output_opts, input_units, output_units);
876 if (negative)
877 *--p = '-';
878 return p;
879 }
880}
881
882/* Add integral value while using uintmax_t for value part and separate
883 negation flag. It adds value of SRC and SRC_NEG to DEST and DEST_NEG.

Callers 1

get_devFunction · 0.85

Calls 1

known_valueFunction · 0.85

Tested by

no test coverage detected