1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-04 23:15:19 +02:00

ubb-patgen/ubb-patgen.c (show_frequencies): show duplicate entries only one

This only affects "quiet" operation since entries with the same frequency
differ in the why it's calculated in non-quiet operation.
This commit is contained in:
Werner Almesberger 2013-01-15 23:14:25 -03:00
parent d5ea5d9ae9
commit 752a77f015

View File

@ -97,11 +97,14 @@ static void show_frequencies(int quiet)
{
const struct mmcclk *clks;
int n, i;
double last = 0;
clks = frequencies(&n);
for (i = 0; i != n; i++) {
if (quiet) {
printf("%f\n", clks[i].bus_clk_hz);
if (clks[i].bus_clk_hz != last)
printf("%f\n", clks[i].bus_clk_hz);
last = clks[i].bus_clk_hz;
} else {
printf("clkdiv = %u, clkrt = %u, bus_clk = ",
clks[i].clkdiv, clks[i].clkrt);