diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-04-28 11:09:22 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-04-28 11:41:52 +0200 |
commit | a95d96a2430db171b40fc2e50589807236f8f746 (patch) | |
tree | b61ac9b83d216f075f3070a47010b48b29f3bcba /src/pstore | |
parent | 914f280d0c0f1555ff94d5490dc4f264af7f331f (diff) | |
download | systemd-a95d96a2430db171b40fc2e50589807236f8f746.tar.gz |
pstore: explicitly set the base when converting record ID
Diffstat (limited to 'src/pstore')
-rw-r--r-- | src/pstore/pstore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pstore/pstore.c b/src/pstore/pstore.c index 815503c6e7..63d6866863 100644 --- a/src/pstore/pstore.c +++ b/src/pstore/pstore.c @@ -196,7 +196,7 @@ static int append_dmesg(PStoreEntry *pe, const char *subdir1, const char *subdir static int process_dmesg_files(PStoreList *list) { /* Move files, reconstruct dmesg.txt */ _cleanup_free_ char *erst_subdir = NULL; - uint64_t last_record_id = 0; + unsigned long long last_record_id = 0; /* When dmesg is written into pstore, it is done so in small chunks, whatever the exchange buffer * size is with the underlying pstore backend (ie. EFI may be ~2KiB), which means an example @@ -252,9 +252,9 @@ static int process_dmesg_files(PStoreList *list) { } else if ((p = startswith(pe->dirent.d_name, "dmesg-erst-"))) { /* For the ERST backend, the record is a monotonically increasing number, seeded as * a timestamp. See linux/drivers/acpi/apei/erst.c in erst_writer(). */ - uint64_t record_id; + unsigned long long record_id; - if (safe_atou64(p, &record_id) < 0) + if (safe_atollu_full(p, 10, &record_id) < 0) continue; if (last_record_id - 1 != record_id) /* A discontinuity in the number has been detected, this current record id |