mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-23 23:52:49 +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:
parent
d5ea5d9ae9
commit
752a77f015
@ -97,11 +97,14 @@ static void show_frequencies(int quiet)
|
|||||||
{
|
{
|
||||||
const struct mmcclk *clks;
|
const struct mmcclk *clks;
|
||||||
int n, i;
|
int n, i;
|
||||||
|
double last = 0;
|
||||||
|
|
||||||
clks = frequencies(&n);
|
clks = frequencies(&n);
|
||||||
for (i = 0; i != n; i++) {
|
for (i = 0; i != n; i++) {
|
||||||
if (quiet) {
|
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 {
|
} else {
|
||||||
printf("clkdiv = %u, clkrt = %u, bus_clk = ",
|
printf("clkdiv = %u, clkrt = %u, bus_clk = ",
|
||||||
clks[i].clkdiv, clks[i].clkrt);
|
clks[i].clkdiv, clks[i].clkrt);
|
||||||
|
Loading…
Reference in New Issue
Block a user