* libparted/labels/gpt.c: Use compile-time "verify" rather than
run-time PED_ASSERT to ensure struct sizes are as expected.
#include <stdbool.h>
#include <errno.h>
#include "xalloc.h"
+#include "verify.h"
#include "pt-tools.h"
typedef struct _PartitionRecord_t PartitionRecord_t;
typedef struct _LegacyMBR_t LegacyMBR_t;
typedef struct _GPTDiskData GPTDiskData;
+
+
typedef struct
{
uint32_t time_low;
void
ped_disk_gpt_init ()
{
- PED_ASSERT (sizeof (GuidPartitionEntryAttributes_t) == 8, return);
- PED_ASSERT (sizeof (GuidPartitionEntry_t) == 128, return);
-
ped_disk_type_register (&gpt_disk_type);
}
{
ped_disk_type_unregister (&gpt_disk_type);
}
+
+verify (sizeof (GuidPartitionEntryAttributes_t) == 8);
+verify (sizeof (GuidPartitionEntry_t) == 128);