summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-09-15 17:14:44 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-09-17 16:05:39 +0100
commitda0a4f8d1f6ddd302ceba028d87c6e009589e503 (patch)
tree1d4bb0d6498e7c97846ae0094826963e29201cf1 /src
parentabac360f324d8c881878c5d9b7fb64be93981125 (diff)
downloadlibguestfs-da0a4f8d1f6ddd302ceba028d87c6e009589e503.tar.gz
libguestfs-da0a4f8d1f6ddd302ceba028d87c6e009589e503.tar.xz
libguestfs-da0a4f8d1f6ddd302ceba028d87c6e009589e503.zip
Remove explicit guestfs=10.0.2.4:6666 kernel command line parameter.
Since we control the appliance tightly, we can just specify that it will always use a particular host and port, and we don't need to pass it on the command line each time. Also the VMCHANNEL_* constants are only relevant to the particular guestfwd vmchannel implementation, so we rename them as GUESTFWD_*.
Diffstat (limited to 'src')
-rw-r--r--src/guestfs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/guestfs.c b/src/guestfs.c
index 8c05c40a..069de45d 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -85,8 +85,8 @@ static void close_handles (void);
#define UNIX_PATH_MAX 108
/* Also in guestfsd.c */
-#define VMCHANNEL_PORT 6666
-#define VMCHANNEL_ADDR "10.0.2.4"
+#define GUESTFWD_PORT 6666
+//#define GUESTFWD_ADDR "10.0.2.4"
/* GuestFS handle and connection. */
enum state { CONFIG, LAUNCHING, READY, BUSY, NO_HANDLE };
@@ -1003,11 +1003,9 @@ guestfs__launch (guestfs_h *g)
/* Linux kernel command line. */
snprintf (append, sizeof append,
LINUX_CMDLINE
- "guestfs=%s:%d "
"%s" /* (selinux) */
"%s" /* (verbose) */
"%s", /* (append) */
- VMCHANNEL_ADDR, VMCHANNEL_PORT,
g->selinux ? "selinux=1 enforcing=0 " : "selinux=0 ",
g->verbose ? "guestfs_verbose=1 " : " ",
g->append ? g->append : "");
@@ -1038,7 +1036,7 @@ guestfs__launch (guestfs_h *g)
*/
snprintf (vmchannel, sizeof vmchannel,
"user,vlan=0,net=10.0.2.0/8,guestfwd=tcp:%s:%d-unix:%s,server,nowait",
- VMCHANNEL_ADDR, VMCHANNEL_PORT, unixsock);
+ GUESTFWD_ADDR, GUESTFWD_PORT, unixsock);
add_cmdline (g, "-net");
add_cmdline (g, vmchannel);
@@ -1049,7 +1047,7 @@ guestfs__launch (guestfs_h *g)
*/
snprintf (vmchannel, sizeof vmchannel,
"channel,%d:unix:%s,server,nowait",
- VMCHANNEL_PORT, unixsock);
+ GUESTFWD_PORT, unixsock);
add_cmdline (g, "-net");
add_cmdline (g, vmchannel);