From e3f7d2754147e76302d6b4e7f52f09bb9a2fed47 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sat, 6 Jun 2020 15:34:02 -0700 Subject: [PATCH] Fix errors on 32 bit print format and signed conversion due to big hex types Signed-off-by: James Bottomley --- src/sbkeysync.c | 6 ++++-- src/sbvarsign.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/sbkeysync.c b/src/sbkeysync.c index 1f37118..e51f177 100644 --- a/src/sbkeysync.c +++ b/src/sbkeysync.c @@ -54,9 +54,11 @@ #include "fileio.h" #include "efivars.h" +static struct statfs statfstype; + #define EFIVARS_MOUNTPOINT "/sys/firmware/efi/efivars" -#define PSTORE_FSTYPE 0x6165676C -#define EFIVARS_FSTYPE 0xde5e81e4 +#define PSTORE_FSTYPE ((typeof(statfstype.f_type))0x6165676C) +#define EFIVARS_FSTYPE ((typeof(statfstype.f_type))0xde5e81e4) #define EFI_IMAGE_SECURITY_DATABASE_GUID \ { 0xd719b2cb, 0x3d3a, 0x4596, \ diff --git a/src/sbvarsign.c b/src/sbvarsign.c index bd1fc17..15dfe8b 100644 --- a/src/sbvarsign.c +++ b/src/sbvarsign.c @@ -332,7 +332,7 @@ int write_signed(struct varsign_context *ctx, int include_attrs) printf("Wrote signed data:\n"); if (include_attrs) { i = sizeof(ctx->var_attrs); - printf(" [%04zx:%04zx] attrs\n", 0l, i); + printf(" [%04lx:%04zx] attrs\n", 0l, i); } printf(" [%04zx:%04x] authentication descriptor\n",