Eliminate variable-length types in parameters

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-18 23:37:11 +01:00
parent 96bdd17579
commit 96c713b69d
3 changed files with 11 additions and 9 deletions

View file

@ -60,7 +60,7 @@
struct grub_netbsd_bootinfo struct grub_netbsd_bootinfo
{ {
grub_uint32_t bi_count; grub_uint32_t bi_count;
grub_addr_t bi_data[0]; grub_uint32_t bi_data[0];
}; };
struct grub_netbsd_btinfo_common struct grub_netbsd_btinfo_common
@ -73,14 +73,14 @@ struct grub_netbsd_btinfo_common
struct grub_netbsd_btinfo_bootdisk struct grub_netbsd_btinfo_bootdisk
{ {
int labelsector; /* label valid if != -1 */ grub_uint32_t labelsector; /* label valid if != 0xffffffff */
struct struct
{ {
grub_uint16_t type, checksum; grub_uint16_t type, checksum;
char packname[16]; char packname[16];
} label; } label;
int biosdev; grub_uint32_t biosdev;
int partition; grub_uint32_t partition;
}; };
struct grub_netbsd_btinfo_symtab struct grub_netbsd_btinfo_symtab

View file

@ -64,9 +64,9 @@
struct grub_openbsd_bootargs struct grub_openbsd_bootargs
{ {
int ba_type; grub_uint32_t ba_type;
int ba_size; grub_uint32_t ba_size;
struct grub_openbsd_bootargs *ba_next; grub_uint32_t ba_next;
} __attribute__ ((packed)); } __attribute__ ((packed));
#endif #endif

View file

@ -822,9 +822,11 @@ grub_openbsd_boot (void)
buf = (grub_uint8_t *) pm; buf = (grub_uint8_t *) pm;
pa->ba_size = (char *) pm - (char *) pa; pa->ba_size = (char *) pm - (char *) pa;
pa->ba_next = (struct grub_openbsd_bootargs *) (buf - buf0 + buf_target); pa->ba_next = buf - buf0 + buf_target;
pa = pa->ba_next; pa = (struct grub_openbsd_bootargs *) buf;
pa->ba_type = OPENBSD_BOOTARG_END; pa->ba_type = OPENBSD_BOOTARG_END;
pa->ba_size = 0;
pa->ba_next = 0;
pa++; pa++;
buf = (grub_uint8_t *) pa; buf = (grub_uint8_t *) pa;