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>
This commit is contained in:
Rusty Russell
2009-07-30 16:03:46 -06:00
parent a91d74a3c4
commit 1842f23c05
8 changed files with 19 additions and 44 deletions

View File

@ -16,15 +16,13 @@
void free_pagetables(void);
int init_pagetables(struct page **switcher_page, unsigned int pages);
struct pgdir
{
struct pgdir {
unsigned long gpgdir;
pgd_t *pgdir;
};
/* We have two pages shared with guests, per cpu. */
struct lguest_pages
{
struct lguest_pages {
/* This is the stack page mapped rw in guest */
char spare[PAGE_SIZE - sizeof(struct lguest_regs)];
struct lguest_regs regs;
@ -89,8 +87,7 @@ struct lg_eventfd_map {
};
/* The private info the thread maintains about the guest. */
struct lguest
{
struct lguest {
struct lguest_data __user *lguest_data;
struct lg_cpu cpus[NR_CPUS];
unsigned int nr_cpus;

View File

@ -207,8 +207,7 @@ static void lg_reset(struct virtio_device *vdev)
*/
/*D:140 This is the information we remember about each virtqueue. */
struct lguest_vq_info
{
struct lguest_vq_info {
/* A copy of the information contained in the device config. */
struct lguest_vqconfig config;