Fix for a bug in 32-bit Debian.

Namely, awk's printf("%d") doing what it's supposed to do, cast
it's operand to (int), which screws up large numbers.
The fix is simple, although it mostly just pushes the problem
under the rug; using %.0f instead of %d.
This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-04-03 12:50:12 -03:00
parent b807088b8e
commit a01de98434
2 changed files with 2 additions and 2 deletions

View File

@@ -1439,7 +1439,7 @@ parse_ip_s_link () { local PTFUNCNAME=parse_ip_s_link;
fuzzy_var = \$1; ${fuzzy_formula} tx_bytes = fuzzy_var;
fuzzy_var = \$2; ${fuzzy_formula} tx_packets = fuzzy_var;
fuzzy_var = \$3; ${fuzzy_formula} tx_errors = fuzzy_var;
printf \" %-8s %10d %10d %10d %10d %10d %10d\\n\", save[\"iface\"], save[\"bytes\"], save[\"packs\"], save[\"errs\"], tx_bytes, tx_packets, tx_errors;
printf \" %-8s %10.0f %10.0f %10.0f %10.0f %10.0f %10.0f\\n\", save[\"iface\"], save[\"bytes\"], save[\"packs\"], save[\"errs\"], tx_bytes, tx_packets, tx_errors;
}
}" "$file"
}