mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
journalctl: Use constants for _BOOT_ID= matches
This commit is contained in:
parent
72fba0c4e5
commit
492f148f1f
@ -1227,7 +1227,7 @@ static int discover_next_boot(sd_journal *j,
|
||||
BootId **ret) {
|
||||
|
||||
_cleanup_free_ BootId *next_boot = NULL;
|
||||
char match[9+32+1] = "_BOOT_ID=";
|
||||
char match[STRLEN("_BOOT_ID=") + SD_ID128_STRING_MAX] = "_BOOT_ID=";
|
||||
sd_id128_t boot_id;
|
||||
int r;
|
||||
|
||||
@ -1336,7 +1336,7 @@ static int get_boots(
|
||||
* If no reference is given, the journal head/tail will do,
|
||||
* they're "virtual" boots after all. */
|
||||
if (boot_id && !sd_id128_is_null(*boot_id)) {
|
||||
char match[9+32+1] = "_BOOT_ID=";
|
||||
char match[STRLEN("_BOOT_ID=") + SD_ID128_STRING_MAX] = "_BOOT_ID=";
|
||||
|
||||
sd_journal_flush_matches(j);
|
||||
|
||||
@ -1467,7 +1467,7 @@ static int list_boots(sd_journal *j) {
|
||||
}
|
||||
|
||||
static int add_boot(sd_journal *j) {
|
||||
char match[9+32+1] = "_BOOT_ID=";
|
||||
char match[STRLEN("_BOOT_ID=") + SD_ID128_STRING_MAX] = "_BOOT_ID=";
|
||||
sd_id128_t boot_id;
|
||||
int r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user