aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2020-06-06 15:34:02 -0700
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2020-06-06 17:22:39 -0700
commite3f7d2754147e76302d6b4e7f52f09bb9a2fed47 (patch)
treef2a778b92227d304f8f8f2b71ad4ac97a37223bc
parent5aeb513916c7b1d37304e28571ad3daeda9e3cb0 (diff)
downloadsbsigntools-e3f7d2754147e76302d6b4e7f52f09bb9a2fed47.tar.gz
Fix errors on 32 bit
print format and signed conversion due to big hex types Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--src/sbkeysync.c6
-rw-r--r--src/sbvarsign.c2
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",