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