mirror of
https://xff.cz/git/u-boot/
synced 2025-09-08 12:12:28 +02:00
bootstage: Show records with a zero time
We can now use the record count to determine whether a record is valid or not. Drop the test for a zero time. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -390,19 +390,16 @@ int bootstage_stash(void *base, int size)
|
|||||||
|
|
||||||
/* Write the records, silently stopping when we run out of space */
|
/* Write the records, silently stopping when we run out of space */
|
||||||
for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) {
|
for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) {
|
||||||
if (rec->time_us != 0)
|
|
||||||
append_data(&ptr, end, rec, sizeof(*rec));
|
append_data(&ptr, end, rec, sizeof(*rec));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write the name strings */
|
/* Write the name strings */
|
||||||
for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) {
|
for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) {
|
||||||
if (rec->time_us != 0) {
|
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
name = get_record_name(buf, sizeof(buf), rec);
|
name = get_record_name(buf, sizeof(buf), rec);
|
||||||
append_data(&ptr, end, name, strlen(name) + 1);
|
append_data(&ptr, end, name, strlen(name) + 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for buffer overflow */
|
/* Check for buffer overflow */
|
||||||
if (ptr > end) {
|
if (ptr > end) {
|
||||||
|
Reference in New Issue
Block a user