Skip to contentSkip to conversation

Add missing files in vnet patch

PATCH New Mike Wray 1 participant 1 message Sep 12, 2005

lore
Share & tools
lore

Mike Wray

author
#0 lore raw

PATCH 1/1 Add missing files in vnet patch

The last vnet patch was missing some files that had been added to my tree but did not appear in 'hg diff'. This patch adds them.

tools/vnet/Make.env new file +20 -0
diff -r 413c911e5780 tools/vnet/Make.env
@@ -0,0 +1,20 @@
+# -*- mode: Makefile; -*-
+
+export XEN_ROOT        = $(shell cd $(VNET_ROOT)/../.. && pwd)
+export LINUX_SERIES   ?= 2.6
+
+DISTDIR               ?= $(XEN_ROOT)/dist
+export DESTDIR        ?= $(DISTDIR)/install
+
+export VNET_MODULE_DIR = $(VNET_ROOT)/vnet-module
+export VNETD_DIR       = $(VNET_ROOT)/vnetd
+export LIBXUTIL_DIR    = $(VNET_ROOT)/libxutil
+
+export GC_DIR          = $(VNET_ROOT)/build/gc
+export GC_INCLUDE      = $(GC_DIR)/include
+export GC_LIB_DIR      = $(GC_DIR)/lib
+export GC_LIB_A        = $(GC_LIB_DIR)/libgc.a
+export GC_LIB_SO       = $(GC_LIB_DIR)/libgc.so
+
+#$(warning XEN_ROOT  = $(XEN_ROOT))
+#$(warning DESTDIR   = $(DESTDIR))
tools/vnet/examples/vnet-insert new file +28 -0
diff -r 413c911e5780 tools/vnet/examples/vnet-insert
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# Insert the vnet module if it can be found and
+# it's not already there.
+vnet_insert () {
+    local module="vnet_module"
+    local mod_dir=/lib/modules/$(uname -r)
+    local mod_obj=""
+
+    if lsmod | grep -q ${module} ; then
+        echo "VNET: ${module} loaded"
+        return
+    fi
+    local mods=$(find ${mod_dir} -name "${module}.*o")
+    if [[ ${mods} ]] ; then
+        for mod_obj in ${mods} ; do
+            break
+        done
+    fi
+    if [ -z "${mod_obj}" ] ; then
+        echo "VNET: ${module} not found"
+        exit 1
+    fi
+    echo "VNET: Loading ${module} from ${mod_obj}"
+    insmod ${mod_obj} "$@"
+}
+
+vnet_insert "$@"
tools/vnet/libxutil/mem_stream.c new file +319 -0

319 lines not on this page · raw message

tools/vnet/libxutil/mem_stream.h new file +32 -0
diff -r 413c911e5780 tools/vnet/libxutil/mem_stream.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2005 Mike Wray <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _XUTIL_MEM_STREAM_H_
+#define _XUTIL_MEM_STREAM_H_
+
+#include "iostream.h"
+
+extern IOStream *mem_stream_new_size(size_t buf_n, size_t buf_max);
+
+extern int mem_stream_avail(IOStream *io);
+
+static inline IOStream *mem_stream_new(void){
+    return mem_stream_new_size(0, 0);
+}
+
+#endif /* !_XUTIL_MEM_STREAM_H_ */
tools/vnet/vnet-module/varp_util.c new file +77 -0

77 lines not on this page · raw message

tools/vnet/vnet-module/varp_util.h new file +142 -0

142 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel