From: Linus Torvalds Date: Sat, 28 Aug 2010 21:08:10 +0000 (-0700) Subject: Merge branch 'lguest' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux... X-Git-Tag: v2.6.36-rc3~10 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=51bbd47d3641beb4a8c2a35d55488c859b60c82d;hp=a5a8283495f55efcfbd83540468f801219a960f2;p=net-next-2.6.git Merge branch 'lguest' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * 'lguest' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: lguest: Odd Fixes lguest: clean up warnings in demonstration launcher. --- diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile index 28c8cdfcafd..bebac6b4f33 100644 --- a/Documentation/lguest/Makefile +++ b/Documentation/lguest/Makefile @@ -1,5 +1,6 @@ # This creates the demonstration utility "lguest" which runs a Linux guest. -CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE +# Missing headers? Add "-I../../include -I../../arch/x86/include" +CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE all: lguest diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index e9ce3c55451..8a6a8c6d498 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c @@ -39,14 +39,14 @@ #include #include #include -#include "linux/lguest_launcher.h" -#include "linux/virtio_config.h" -#include "linux/virtio_net.h" -#include "linux/virtio_blk.h" -#include "linux/virtio_console.h" -#include "linux/virtio_rng.h" -#include "linux/virtio_ring.h" -#include "asm/bootparam.h" +#include +#include +#include +#include +#include +#include +#include +#include "../../include/linux/lguest_launcher.h" /*L:110 * We can ignore the 42 include files we need for this program, but I do want * to draw attention to the use of kernel-style types. @@ -1447,14 +1447,15 @@ static void add_to_bridge(int fd, const char *if_name, const char *br_name) static void configure_device(int fd, const char *tapif, u32 ipaddr) { struct ifreq ifr; - struct sockaddr_in *sin = (struct sockaddr_in *)&ifr.ifr_addr; + struct sockaddr_in sin; memset(&ifr, 0, sizeof(ifr)); strcpy(ifr.ifr_name, tapif); /* Don't read these incantations. Just cut & paste them like I did! */ - sin->sin_family = AF_INET; - sin->sin_addr.s_addr = htonl(ipaddr); + sin.sin_family = AF_INET; + sin.sin_addr.s_addr = htonl(ipaddr); + memcpy(&ifr.ifr_addr, &sin, sizeof(sin)); if (ioctl(fd, SIOCSIFADDR, &ifr) != 0) err(1, "Setting %s interface address", tapif); ifr.ifr_flags = IFF_UP; diff --git a/MAINTAINERS b/MAINTAINERS index 5fa8451ec80..4523d6cb4c4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3488,7 +3488,7 @@ LGUEST M: Rusty Russell L: lguest@lists.ozlabs.org W: http://lguest.ozlabs.org/ -S: Maintained +S: Odd Fixes F: Documentation/lguest/ F: arch/x86/lguest/ F: drivers/lguest/