Merge pull request #23531 from yuwata/sd-bus-drop-version-2

sd-bus: drop version 2 format support
This commit is contained in:
Yu Watanabe
2022-06-01 14:51:44 +09:00
committed by GitHub
21 changed files with 495 additions and 2541 deletions
+3 -3
View File
@@ -96,12 +96,12 @@ static EFI_STATUS pack_cpio_one(
return EFI_OUT_OF_RESOURCES;
/* Align the whole header to 4 byte size */
l = ALIGN_TO(l, 4);
l = ALIGN4(l);
if (l == UINTN_MAX) /* overflow check */
return EFI_OUT_OF_RESOURCES;
/* Align the contents to 4 byte size */
q = ALIGN_TO(contents_size, 4);
q = ALIGN4(contents_size);
if (q == UINTN_MAX) /* overflow check */
return EFI_OUT_OF_RESOURCES;
@@ -188,7 +188,7 @@ static EFI_STATUS pack_cpio_dir(
l += path_size;
/* Align the whole header to 4 byte size */
l = ALIGN_TO(l, 4);
l = ALIGN4(l);
if (l == UINTN_MAX) /* overflow check */
return EFI_OUT_OF_RESOURCES;
+2 -2
View File
@@ -34,7 +34,7 @@ static EFI_STATUS combine_initrd(
/* Combines four initrds into one, by simple concatenation in memory */
n = ALIGN_TO(initrd_size, 4); /* main initrd might not be padded yet */
n = ALIGN4(initrd_size); /* main initrd might not be padded yet */
if (credential_initrd) {
if (n > UINTN_MAX - credential_initrd_size)
return EFI_OUT_OF_RESOURCES;
@@ -71,7 +71,7 @@ static EFI_STATUS combine_initrd(
memcpy(p, PHYSICAL_ADDRESS_TO_POINTER(initrd_base), initrd_size);
p += initrd_size;
pad = ALIGN_TO(initrd_size, 4) - initrd_size;
pad = ALIGN4(initrd_size) - initrd_size;
if (pad > 0) {
memset(p, 0, pad);
p += pad;