diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-07-30 16:03:46 -0600 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-07-30 16:03:46 +0930 |
commit | 1842f23c05b6a866be831aa60bc8a8731c58ddd0 (patch) | |
tree | 8047f21d149b3958b5c4278c1a5601ddce9e0e4b /Documentation | |
parent | a91d74a3c4de8115295ee87350c13a329164aaaf (diff) | |
download | talos-op-linux-1842f23c05b6a866be831aa60bc8a8731c58ddd0.tar.gz talos-op-linux-1842f23c05b6a866be831aa60bc8a8731c58ddd0.zip |
lguest and virtio: cleanup struct definitions to Linux style.
I've been doing this for years, and akpm picked me up on it about 12
months ago. lguest partly serves as example code, so let's do it Right.
Also, remove two unused fields in struct vblk_info in the example launcher.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/lguest/lguest.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 45163651b519..950cde6d6e58 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c @@ -93,8 +93,7 @@ static int lguest_fd; static unsigned int __thread cpu_id; /* This is our list of devices. */ -struct device_list -{ +struct device_list { /* Counter to assign interrupt numbers. */ unsigned int next_irq; @@ -114,8 +113,7 @@ struct device_list static struct device_list devices; /* The device structure describes a single device. */ -struct device -{ +struct device { /* The linked-list pointer. */ struct device *next; @@ -140,8 +138,7 @@ struct device }; /* The virtqueue structure describes a queue attached to a device. */ -struct virtqueue -{ +struct virtqueue { struct virtqueue *next; /* Which device owns me. */ @@ -779,8 +776,7 @@ static void add_used_and_trigger(struct virtqueue *vq, unsigned head, int len) * * We associate some data with the console for our exit hack. */ -struct console_abort -{ +struct console_abort { /* How many times have they hit ^C? */ int count; /* When did they start? */ @@ -1570,20 +1566,13 @@ static void setup_tun_net(char *arg) /*:*/ /* This hangs off device->priv. */ -struct vblk_info -{ +struct vblk_info { /* The size of the file. */ off64_t len; /* The file descriptor for the file. */ int fd; - /* IO thread listens on this file descriptor [0]. */ - int workpipe[2]; - - /* IO thread writes to this file descriptor to mark it done, then - * Launcher triggers interrupt to Guest. */ - int done_fd; }; /*L:210 |