2012-11-13 21:30:32 +08:00
|
|
|
#include "../cache.h"
|
|
|
|
#include "progress.h"
|
|
|
|
|
2013-10-24 01:08:48 +08:00
|
|
|
static void null_progress__update(u64 curr __maybe_unused,
|
|
|
|
u64 total __maybe_unused,
|
|
|
|
const char *title __maybe_unused)
|
2012-11-13 21:30:32 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-10-24 01:08:48 +08:00
|
|
|
static struct ui_progress_ops null_progress__ops =
|
2012-11-13 21:30:32 +08:00
|
|
|
{
|
2013-10-24 01:08:48 +08:00
|
|
|
.update = null_progress__update,
|
2012-11-13 21:30:32 +08:00
|
|
|
};
|
|
|
|
|
2013-10-24 01:08:48 +08:00
|
|
|
struct ui_progress_ops *ui_progress__ops = &null_progress__ops;
|
2012-11-13 21:30:32 +08:00
|
|
|
|
|
|
|
void ui_progress__update(u64 curr, u64 total, const char *title)
|
|
|
|
{
|
2013-10-24 01:08:48 +08:00
|
|
|
return ui_progress__ops->update(curr, total, title);
|
2012-11-13 21:30:32 +08:00
|
|
|
}
|
2012-11-13 21:30:34 +08:00
|
|
|
|
|
|
|
void ui_progress__finish(void)
|
|
|
|
{
|
2013-10-24 01:08:48 +08:00
|
|
|
if (ui_progress__ops->finish)
|
|
|
|
ui_progress__ops->finish();
|
2012-11-13 21:30:34 +08:00
|
|
|
}
|