From: "Christoph Egger" Subject: [PATCH] Minor fixes for non-Linux platforms Date: Thu, 12 Oct 2006 10:33:41 +0200 Message-ID: <200610121033.42046.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_m3fLF7zbFbYEC+M" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_m3fLF7zbFbYEC+M Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello! The attached patch makes the stuff in tools/check/ work for *BSD systems. Consider this as a start to make xen buildable on non-Linux platforms. I don't expect to get this into xen 3.0.3, but I hope this can go into -unstable. --Boundary-00=_m3fLF7zbFbYEC+M Content-Type: text/x-diff; charset=us-ascii; name=tools_check.diff Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=tools_check.diff diff -r f14a67a35bec tools/check/check_brctl =2D-- a/tools/check/check_brctl Thu Oct 12 17:53:51 2006 +0100 +++ b/tools/check/check_brctl Thu Oct 12 10:17:33 2006 +0200 @@ -1,4 +1,4 @@ =2D#!/bin/bash +#!/bin/sh # CHECK-INSTALL =20 function error { @@ -7,4 +7,18 @@ function error { exit 1 } =20 =2Dwhich brctl 1>/dev/null 2>&1 || error + +case ${OS} in +OpenBSD|NetBSD|FreeBSD) + # These systems have a bridge builtin + which brconfig 1>/dev/null 2>&1 || error + ;; +Linux) + which brctl 1>/dev/null 2>&1 || error + ;; +*) + echo "Unknown OS" && error + ;; +esac + +exit 0 diff -r f14a67a35bec tools/check/check_iproute =2D-- a/tools/check/check_iproute Thu Oct 12 17:53:51 2006 +0100 +++ b/tools/check/check_iproute Thu Oct 12 10:17:33 2006 +0200 @@ -1,4 +1,4 @@ =2D#!/bin/bash +#!/bin/sh # CHECK-INSTALL =20 function error { @@ -7,5 +7,16 @@ function error { exit 1 } =20 =2Dip addr list 1>/dev/null 2>&1 || error +case ${OS} in +OpenBSD|NetBSD|FreeBSD) + ifconfig -a 1>/dev/null 2>&1 || error + ;; +Linux) + ip addr list 1>/dev/null 2>&1 || error + ;; +*) + echo "Unknown OS" && error + ;; +esac =20 +exit 0=09 diff -r f14a67a35bec tools/check/check_python =2D-- a/tools/check/check_python Thu Oct 12 17:53:51 2006 +0100 +++ b/tools/check/check_python Thu Oct 12 10:17:33 2006 +0200 @@ -1,4 +1,4 @@ =2D#!/bin/bash +#!/bin/sh # CHECK-BUILD CHECK-INSTALL =20 function error { diff -r f14a67a35bec tools/check/check_zlib_devel =2D-- a/tools/check/check_zlib_devel Thu Oct 12 17:53:51 2006 +0100 +++ b/tools/check/check_zlib_devel Thu Oct 12 10:17:33 2006 +0200 @@ -1,4 +1,4 @@ =2D#!/bin/bash +#!/bin/sh # CHECK-BUILD =20 function error { diff -r f14a67a35bec tools/check/check_zlib_lib =2D-- a/tools/check/check_zlib_lib Thu Oct 12 17:53:51 2006 +0100 +++ b/tools/check/check_zlib_lib Thu Oct 12 10:17:33 2006 +0200 @@ -1,4 +1,4 @@ =2D#!/bin/bash +#!/bin/sh # CHECK-BUILD CHECK-INSTALL =20 function error { @@ -8,4 +8,4 @@ function error { } =20 set -e =2Dldconfig -p | grep -q libz.so || error +ldconfig -v 2>&1 | grep -q libz.so || error diff -r f14a67a35bec tools/check/chk =2D-- a/tools/check/chk Thu Oct 12 17:53:51 2006 +0100 +++ b/tools/check/chk Thu Oct 12 10:17:33 2006 +0200 @@ -1,4 +1,4 @@ =2D#!/bin/bash +#!/bin/sh =20 function usage { echo "Usage:" @@ -13,6 +13,7 @@ function usage { } =20 export PATH=3D${PATH}:/sbin:/usr/sbin +export OS=3D`uname -s` =20 case $1 in build) --Boundary-00=_m3fLF7zbFbYEC+M Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_m3fLF7zbFbYEC+M--