4 static void null_progress__update(struct ui_progress
*p __maybe_unused
)
8 static struct ui_progress_ops null_progress__ops
=
10 .update
= null_progress__update
,
13 struct ui_progress_ops
*ui_progress__ops
= &null_progress__ops
;
15 void ui_progress__update(struct ui_progress
*p
, u64 adv
)
19 if (p
->curr
>= p
->next
) {
21 ui_progress__ops
->update(p
);
25 void ui_progress__init(struct ui_progress
*p
, u64 total
, const char *title
)
28 p
->next
= p
->step
= total
/ 16;
34 void ui_progress__finish(void)
36 if (ui_progress__ops
->finish
)
37 ui_progress__ops
->finish();