/* Get a record name as a printable string */
static const char* get_record_name(char *buf, int len, const struct bootstage_record *rec)
/* Get a record name as a printable string */
static const char* get_record_name(char *buf, int len, const struct bootstage_record *rec)
{
	if (rec->name)
		return rec->name;
	else if (rec->id >= BOOTSTAGE_ID_USER)
		snprintf(buf, len, "user_%d", rec->id - BOOTSTAGE_ID_USER);
	else
		snprintf(buf, len, "id=%d", rec->id);
	return buf;
}