-static void __attribute__((format(__printf__, 4, 5))) update_status(
- boot_status_fn fn, void *arg, int type, char *fmt, ...)
-{
- struct boot_status status;
- va_list ap;
-
- va_start(ap, fmt);
- status.message = talloc_vasprintf(NULL, fmt, ap);
- va_end(ap);
-
- status.type = type;
- status.progress = -1;
- status.detail = NULL;
-
- pb_debug("boot status: [%d] %s\n", type, status.message);
-
- fn(arg, &status);
-
- talloc_free(status.message);
-}
-