Skip to contentSkip to conversation

lguest: move the lguest tool to the tools directory

PATCH Applied Davidlohr Bueso 2 participants 3 messages Dec 2, 2011 – Dec 4, 2011 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lguest: move the lguest tool to the tools directory

From: Davidlohr Bueso <[email protected]>

This is a better location instead of having it in Documentation.

---
 Documentation/virtual/lguest/Makefile   |    8 -
 Documentation/virtual/lguest/extract    |   58 -
 Documentation/virtual/lguest/lguest.c   | 2065 -------------------------------
 Documentation/virtual/lguest/lguest.txt |    2 +-
 tools/lguest/Makefile                   |    8 +
 tools/lguest/extract                    |   58 +
 tools/lguest/lguest.c                   | 2065 +++++++++++++++++++++++++++++++
 7 files changed, 2132 insertions(+), 2132 deletions(-)
 delete mode 100644 Documentation/virtual/lguest/Makefile
 delete mode 100644 Documentation/virtual/lguest/extract
 delete mode 100644 Documentation/virtual/lguest/lguest.c
 create mode 100644 tools/lguest/Makefile
 create mode 100644 tools/lguest/extract
 create mode 100644 tools/lguest/lguest.c
Documentation/virtual/lguest/Makefile deleted +0 -8
deleted file mode 100644
index 0ac3420..0000000
@@ -1,8 +0,0 @@
-# This creates the demonstration utility "lguest" which runs a Linux guest.
-# Missing headers?  Add "-I../../../include -I../../../arch/x86/include"
-CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE
-
-all: lguest
-
-clean:
-	rm -f lguest
Documentation/virtual/lguest/extract deleted +0 -58

58 lines not on this page · raw message

Documentation/virtual/lguest/lguest.c deleted +0 -2065

2,065 lines not on this page · raw message

Documentation/virtual/lguest/lguest.txt +1 -1
index bff0c55..6398380 100644
@@ -53,7 +53,7 @@ Running Lguest:
      "Linux hypervisor example code" = M/Y
         (CONFIG_LGUEST=m)
 
-- A tool called "lguest" is available in this directory: type "make"
+- A tool called "lguest" is available in the tools directory: type "make"
   to build it.  If you didn't build your kernel in-tree, use "make
   O=<builddir>".
 
tools/lguest/Makefile new file +8 -0
new file mode 100644
index 0000000..0ac3420
@@ -0,0 +1,8 @@
+# This creates the demonstration utility "lguest" which runs a Linux guest.
+# Missing headers?  Add "-I../../../include -I../../../arch/x86/include"
+CFLAGS:=-m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE
+
+all: lguest
+
+clean:
+	rm -f lguest
tools/lguest/extract new file +58 -0

58 lines not on this page · raw message

tools/lguest/lguest.c new file +2065 -0

795 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.4.1

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 5 lines · Davidlohr Bueso

From: Davidlohr Bueso <[email protected]>

This is a better location instead of having it in Documentation.

Applied, thanks! This has been on my TODO list for ages. Almost since tools/ was created.

Weird that your patch didn't come through as a simple move and slight mod though: this way it's a pain to read :( I checked, you didn't change anything.

But unfortunately that's a problem:

$ make
cc -m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE    lguest.c   -o lguest
lguest.c:52:52: fatal error: ../../../include/linux/lguest_launcher.h: No such file or directory
compilation terminated.
make: *** [lguest] Error 1

You need this as well:

From: Rusty Russell <[email protected]>
Subject: lguest: move the lguest tool to the tools directory (fixes)

Fixup complilation breakage from move.

---
 drivers/lguest/Makefile |    2 +-
 tools/lguest/lguest.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/lguest/Makefile +1 -1
@@ -18,7 +18,7 @@ Mastery: PREFIX=M
 Beer:
 	@for f in Preparation Guest Drivers Launcher Host Switcher Mastery; do echo "{==- $$f -==}"; make -s $$f; done; echo "{==-==}"
 Preparation Preparation! Guest Drivers Launcher Host Switcher Mastery:
-	@sh ../../Documentation/virtual/lguest/extract $(PREFIX) `find ../../* -name '*.[chS]' -wholename '*lguest*'`
+	@sh ../../tools/lguest/extract $(PREFIX) `find ../../* -name '*.[chS]' -wholename '*lguest*'`
 Puppy:
 	@clear
 	@printf "      __  \n (___()'\`;\n /,    /\`\n \\\\\\\"--\\\\\\   \n"
tools/lguest/lguest.c +1 -1
@@ -49,7 +49,7 @@
 #include <linux/virtio_rng.h>
 #include <linux/virtio_ring.h>
 #include <asm/bootparam.h>
-#include "../../../include/linux/lguest_launcher.h"
+#include "../../include/linux/lguest_launcher.h"
 /*L:110
  * We can ignore the 43 include files we need for this program, but I do want
  * to draw attention to the use of kernel-style types.
#2 lore raw
Quoted 51 lines · Rusty Russell
Quoted 5 lines · Davidlohr Bueso

From: Davidlohr Bueso <[email protected]>

This is a better location instead of having it in Documentation.

Applied, thanks! This has been on my TODO list for ages. Almost since tools/ was created.

Weird that your patch didn't come through as a simple move and slight mod though: this way it's a pain to read :( I checked, you didn't change anything.

But unfortunately that's a problem:

$ make
cc -m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -U_FORTIFY_SOURCE    lguest.c   -o lguest
lguest.c:52:52: fatal error: ../../../include/linux/lguest_launcher.h: No such file or directory
compilation terminated.
make: *** [lguest] Error 1

You need this as well:

From: Rusty Russell <[email protected]>
Subject: lguest: move the lguest tool to the tools directory (fixes)

Fixup complilation breakage from move.

---
 drivers/lguest/Makefile |    2 +-
 tools/lguest/lguest.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/lguest/Makefile +1 -1
@@ -18,7 +18,7 @@ Mastery: PREFIX=M
 Beer:
 	@for f in Preparation Guest Drivers Launcher Host Switcher Mastery; do echo "{==- $$f -==}"; make -s $$f; done; echo "{==-==}"
 Preparation Preparation! Guest Drivers Launcher Host Switcher Mastery:
-	@sh ../../Documentation/virtual/lguest/extract $(PREFIX) `find ../../* -name '*.[chS]' -wholename '*lguest*'`
+	@sh ../../tools/lguest/extract $(PREFIX) `find ../../* -name '*.[chS]' -wholename '*lguest*'`
 Puppy:
 	@clear
 	@printf "      __  \n (___()'\`;\n /,    /\`\n \\\\\\\"--\\\\\\   \n"

tools/lguest/lguest.c line 52

Quoted 5 lines
tools/lguest/lguest.c +1 -1
@@ -49,7 +49,7 @@
 #include <linux/virtio_rng.h>
 #include <linux/virtio_ring.h>
 #include <asm/bootparam.h>
-#include "../../../include/linux/lguest_launcher.h"
+#include "../../include/linux/lguest_launcher.h"

Maybe because my git foo sucks but I had made that change and certainly thought it was included in the patch, sorry about that.

Thanks,
Davidlohr

Quoted 4 lines
tools/lguest/lguest.c +0 -0
 /*L:110
  * We can ignore the 43 include files we need for this program, but I do want
  * to draw attention to the use of kernel-style types.