]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
include/grub/types.h: Add PRI*GRUB_OFFSET and PRI*GRUB_DISK_ADDR
authorGlenn Washburn <development@efficientek.com>
Wed, 28 Jun 2023 07:38:23 +0000 (02:38 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 3 Jul 2023 11:54:27 +0000 (13:54 +0200)
These are currently always the same as PRI*GRUB_UINT64_T, but they may
not be in the future.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
include/grub/types.h

index 9f43a55809359e8a65e8185b5e7a632e5f8b1253..0d96006fe2a2fa36d893fb23e25acf4ffb8d3945 100644 (file)
@@ -182,10 +182,13 @@ typedef grub_uint64_t grub_properly_aligned_t;
 #define GRUB_PROPERLY_ALIGNED_ARRAY(name, size) grub_properly_aligned_t name[((size) + sizeof (grub_properly_aligned_t) - 1) / sizeof (grub_properly_aligned_t)]
 
 /* The type for representing a file offset.  */
-typedef grub_uint64_t  grub_off_t;
+typedef grub_uint64_t          grub_off_t;
+#define PRIxGRUB_OFFSET                PRIxGRUB_UINT64_T
+#define PRIuGRUB_OFFSET                PRIuGRUB_UINT64_T
 
 /* The type for representing a disk block address.  */
-typedef grub_uint64_t  grub_disk_addr_t;
+typedef grub_uint64_t          grub_disk_addr_t;
+#define PRIxGRUB_DISK_ADDR     PRIxGRUB_UINT64_T
 
 /* Byte-orders.  */
 static inline grub_uint16_t grub_swap_bytes16(grub_uint16_t _x)