aboutsummaryrefslogtreecommitdiffstats
path: root/com32/mboot/mb_info.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-04-27 11:00:44 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-04-27 11:00:44 -0700
commit6c0fb9ea3e8ac6ecf7c9fe3f8708999c0031e9b6 (patch)
treec9ba63f7256adb4403c3959ea9efb271ca03018f /com32/mboot/mb_info.h
parent5c87f5fe02d93311b0a374ce847549fd28260f67 (diff)
downloadsyslinux-6c0fb9ea3e8ac6ecf7c9fe3f8708999c0031e9b6.tar.gz
syslinux-6c0fb9ea3e8ac6ecf7c9fe3f8708999c0031e9b6.tar.xz
syslinux-6c0fb9ea3e8ac6ecf7c9fe3f8708999c0031e9b6.zip
mboot: add header guards; use <inttypes.h>; formatting changes
Reformat the mboot header files slightly, use <inttypes.h> types, and add header inclusion guards. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/mboot/mb_info.h')
-rw-r--r--com32/mboot/mb_info.h40
1 files changed, 16 insertions, 24 deletions
diff --git a/com32/mboot/mb_info.h b/com32/mboot/mb_info.h
index ec12fe8a..149099fc 100644
--- a/com32/mboot/mb_info.h
+++ b/com32/mboot/mb_info.h
@@ -21,10 +21,12 @@
* The structure type "mod_list" is used by the "multiboot_info" structure.
*/
+#ifndef MBOOT_MB_INFO_H
+#define MBOOT_MB_INFO_H
+
#include <inttypes.h>
-struct mod_list
-{
+struct mod_list {
/* the memory used goes from bytes 'mod_start' to 'mod_end-1' inclusive */
uint32_t mod_start;
uint32_t mod_end;
@@ -44,13 +46,11 @@ struct mod_list
* map has been reached.
*/
-struct AddrRangeDesc
-{
+struct AddrRangeDesc {
uint32_t size;
uint64_t BaseAddr;
uint64_t Length;
uint32_t Type;
-
/* unspecified optional padding... */
} __attribute__((packed));
@@ -59,8 +59,7 @@ struct AddrRangeDesc
/* Drive Info structure. */
-struct drive_info
-{
+struct drive_info {
/* The size of this structure. */
uint32_t size;
@@ -85,8 +84,7 @@ struct drive_info
/* APM BIOS info. */
-struct apm_info
-{
+struct apm_info {
uint16_t version;
uint16_t cseg;
uint32_t offset;
@@ -105,8 +103,7 @@ struct apm_info
* its address in the EAX register.
*/
-struct multiboot_info
-{
+struct multiboot_info {
/* MultiBoot info version number */
uint32_t flags;
@@ -124,29 +121,22 @@ struct multiboot_info
uint32_t mods_count;
uint32_t mods_addr;
- union
- {
- struct
- {
+ union {
+ struct {
/* (a.out) Kernel symbol table info */
uint32_t tabsize;
uint32_t strsize;
uint32_t addr;
uint32_t pad;
- }
- a;
-
- struct
- {
+ } a;
+ struct {
/* (ELF) Kernel section header table */
uint32_t num;
uint32_t size;
uint32_t addr;
uint32_t shndx;
- }
- e;
- }
- syms;
+ } e;
+ } syms;
/* Memory Mapping buffer */
uint32_t mmap_length;
@@ -217,3 +207,5 @@ struct multiboot_info
*/
#define MULTIBOOT_VALID 0x2BADB002
+
+#endif /* MBOOT_MB_INFO_H */