WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xencommons: modprobe xenfs if it not be loaded

To: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xencommons: modprobe xenfs if it not be loaded
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 21 Jun 2010 10:46:01 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 21 Jun 2010 02:47:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C1C7B88.1000907@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4C1C744F.8030903@xxxxxxxxxxxxxx> <4C1C7B88.1000907@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Lightning/1.0b2pre Thunderbird/3.0.4
On 06/19/2010 09:10 AM, Yu Zhiguo wrote:
> Do a small fix in order to be compatible with the old Dom0 kernel
> which has no xenfs.ko.
>
> -----------
>
> If xenfs is compiled as a module, now cannot complete
> 'service xencommons start', modprobe xenfs can fix it.
>   

It should just be sufficient to explicitly mount /proc/xen, which will
trigger a modprobe if necessary.

    J

> Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
>
> diff -r b9c541d9c138 -r 96978e701b26 tools/hotplug/Linux/init.d/xencommons
> --- a/tools/hotplug/Linux/init.d/xencommons   Tue Jun 15 13:27:14 2010 +0100
> +++ b/tools/hotplug/Linux/init.d/xencommons   Sun Jun 20 00:11:45 2010 +0800
> @@ -24,16 +24,21 @@
>  XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
>  shopt -s extglob
>  
> -if test "x$1" = xstart && \
> -     test -d /proc/xen && \
> -   ! test -d /proc/xen/capabilities && \
> -     grep '  xenfs$' /proc/filesystems >/dev/null && \
> -   ! grep '^xenfs ' /proc/mounts >/dev/null;
> -then
> -     mount -t xenfs xenfs /proc/xen
> +if test "x$1" = xstart; then
> +     if ! grep '     xenfs$' /proc/filesystems >/dev/null; then
> +             test -x /sbin/modprobe && /sbin/modprobe xenfs 2>/dev/null
> +     fi
> +     if test -d /proc/xen && \
> +         ! test -d /proc/xen/capabilities && \
> +           grep '    xenfs$' /proc/filesystems >/dev/null && \
> +         ! grep '^xenfs ' /proc/mounts >/dev/null;
> +     then
> +             mount -t xenfs xenfs /proc/xen
> +     fi
>  fi
>  
> -if ! grep -q "control_d" /proc/xen/capabilities ; then
> +if ! test -e /proc/xen/capabilities || \
> +    ! grep -q "control_d" /proc/xen/capabilities ; then
>       exit 0
>  fi
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>   


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel