diff options
Diffstat (limited to 'Documentation/lguest/lguest.c')
-rw-r--r-- | Documentation/lguest/lguest.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 5bdc37f81842..c91c28ae8290 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -34,25 +34,24 @@ | |||
34 | #include <zlib.h> | 34 | #include <zlib.h> |
35 | #include <assert.h> | 35 | #include <assert.h> |
36 | #include <sched.h> | 36 | #include <sched.h> |
37 | /*L:110 We can ignore the 30 include files we need for this program, but I do | ||
38 | * want to draw attention to the use of kernel-style types. | ||
39 | * | ||
40 | * As Linus said, "C is a Spartan language, and so should your naming be." I | ||
41 | * like these abbreviations and the header we need uses them, so we define them | ||
42 | * here. | ||
43 | */ | ||
44 | typedef unsigned long long u64; | ||
45 | typedef uint32_t u32; | ||
46 | typedef uint16_t u16; | ||
47 | typedef uint8_t u8; | ||
48 | #include "linux/lguest_launcher.h" | 37 | #include "linux/lguest_launcher.h" |
49 | #include "linux/pci_ids.h" | ||
50 | #include "linux/virtio_config.h" | 38 | #include "linux/virtio_config.h" |
51 | #include "linux/virtio_net.h" | 39 | #include "linux/virtio_net.h" |
52 | #include "linux/virtio_blk.h" | 40 | #include "linux/virtio_blk.h" |
53 | #include "linux/virtio_console.h" | 41 | #include "linux/virtio_console.h" |
54 | #include "linux/virtio_ring.h" | 42 | #include "linux/virtio_ring.h" |
55 | #include "asm-x86/bootparam.h" | 43 | #include "asm-x86/bootparam.h" |
44 | /*L:110 We can ignore the 38 include files we need for this program, but I do | ||
45 | * want to draw attention to the use of kernel-style types. | ||
46 | * | ||
47 | * As Linus said, "C is a Spartan language, and so should your naming be." I | ||
48 | * like these abbreviations, so we define them here. Note that u64 is always | ||
49 | * unsigned long long, which works on all Linux systems: this means that we can | ||
50 | * use %llu in printf for any u64. */ | ||
51 | typedef unsigned long long u64; | ||
52 | typedef uint32_t u32; | ||
53 | typedef uint16_t u16; | ||
54 | typedef uint8_t u8; | ||
56 | /*:*/ | 55 | /*:*/ |
57 | 56 | ||
58 | #define PAGE_PRESENT 0x7 /* Present, RW, Execute */ | 57 | #define PAGE_PRESENT 0x7 /* Present, RW, Execute */ |