mirror of
https://github.com/systemd/systemd.git
synced 2024-11-06 08:26:52 +03:00
tree-wide: use SD_ID128_UUID_FORMAT_STR as appropriate
This commit is contained in:
parent
38df8d3f52
commit
bd44566c4d
@ -220,7 +220,7 @@ static int status_binaries(const char *esp_path, sd_id128_t partition) {
|
||||
|
||||
printf(" ESP: %s", esp_path);
|
||||
if (!sd_id128_is_null(partition))
|
||||
printf(" (/dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x)", SD_ID128_FORMAT_VAL(partition));
|
||||
printf(" (/dev/disk/by-partuuid/" SD_ID128_UUID_FORMAT_STR ")", SD_ID128_FORMAT_VAL(partition));
|
||||
printf("\n");
|
||||
|
||||
r = enumerate_binaries(esp_path, "EFI/systemd", NULL);
|
||||
@ -262,7 +262,8 @@ static int print_efi_option(uint16_t id, bool in_order) {
|
||||
printf(" Title: %s%s%s\n", ansi_highlight(), strna(title), ansi_normal());
|
||||
printf(" ID: 0x%04X\n", id);
|
||||
printf(" Status: %sactive%s\n", active ? "" : "in", in_order ? ", boot-order" : "");
|
||||
printf(" Partition: /dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n", SD_ID128_FORMAT_VAL(partition));
|
||||
printf(" Partition: /dev/disk/by-partuuid/" SD_ID128_UUID_FORMAT_STR "\n",
|
||||
SD_ID128_FORMAT_VAL(partition));
|
||||
printf(" File: %s%s\n", special_glyph(SPECIAL_GLYPH_TREE_RIGHT), path);
|
||||
printf("\n");
|
||||
|
||||
@ -380,7 +381,8 @@ static int status_entries(
|
||||
printf("Boot Loader Entries:\n"
|
||||
" $BOOT: %s", dollar_boot_path);
|
||||
if (!sd_id128_is_null(dollar_boot_partition_uuid))
|
||||
printf(" (/dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x)", SD_ID128_FORMAT_VAL(dollar_boot_partition_uuid));
|
||||
printf(" (/dev/disk/by-partuuid/" SD_ID128_UUID_FORMAT_STR ")",
|
||||
SD_ID128_FORMAT_VAL(dollar_boot_partition_uuid));
|
||||
printf("\n\n");
|
||||
|
||||
r = boot_entries_load_config(esp_path, xbootldr_path, &config);
|
||||
@ -1150,7 +1152,7 @@ static int verb_status(int argc, char *argv[], void *userdata) {
|
||||
if (stub)
|
||||
printf(" Stub: %s\n", stub);
|
||||
if (!sd_id128_is_null(loader_part_uuid))
|
||||
printf(" ESP: /dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
|
||||
printf(" ESP: /dev/disk/by-partuuid/" SD_ID128_UUID_FORMAT_STR "\n",
|
||||
SD_ID128_FORMAT_VAL(loader_part_uuid));
|
||||
else
|
||||
printf(" ESP: n/a\n");
|
||||
|
@ -772,7 +772,7 @@ int efi_loader_get_device_part_uuid(sd_id128_t *u) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (sscanf(p, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
if (sscanf(p, SD_ID128_UUID_FORMAT_STR,
|
||||
&parsed[0], &parsed[1], &parsed[2], &parsed[3],
|
||||
&parsed[4], &parsed[5], &parsed[6], &parsed[7],
|
||||
&parsed[8], &parsed[9], &parsed[10], &parsed[11],
|
||||
|
@ -33,7 +33,7 @@ int id128_pretty_print(sd_id128_t id, bool pretty) {
|
||||
printf("As string:\n"
|
||||
"%s" SD_ID128_FORMAT_STR "%s\n\n"
|
||||
"As UUID:\n"
|
||||
"%s%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x%s\n\n"
|
||||
"%s" SD_ID128_UUID_FORMAT_STR "%s\n\n"
|
||||
"As %s macro:\n"
|
||||
"%s#define MESSAGE_XYZ SD_ID128_MAKE(",
|
||||
on, SD_ID128_FORMAT_VAL(id), off,
|
||||
|
Loading…
Reference in New Issue
Block a user