From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Subject: Re: [PATCH] Fix name of Xen event-channel device Date: Fri, 28 May 2010 15:24:40 +0200 Message-ID: References: <20100526105144.GA28280@wavehammer.waldi.eu.org> <20100527073512.GA17135@wavehammer.waldi.eu.org> <20100527143104.GB6040@wavehammer.waldi.eu.org> <20100527150251.GD6040@wavehammer.waldi.eu.org> <4BFEA2DF.8080006@msgid.tls.msk.ru> <20100527171313.GB11358@wavehammer.waldi.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20100527171313.GB11358@wavehammer.waldi.eu.org> Sender: linux-kernel-owner@vger.kernel.org To: Bastian Blank , Michael Tokarev , xen-devel@lists.xensource.com, Jeremy Fitzhardinge , linux-kernel@vger.kernel.org List-Id: xen-devel@lists.xenproject.org On Thu, May 27, 2010 at 19:13, Bastian Blank wrote: > On Thu, May 27, 2010 at 08:50:39PM +0400, Michael Tokarev wrote: >> Bastian Blank wrote: >> > The Xen event-channel device is named evtchn in the kernel but alw= ays >> > used as /dev/xen/evtchn in userspace. This patch fixes the name. >> > >> > Signed-off-by: Bastian Blank >> > >> > diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c >> > index 66e185c..89cd743 100644 >> > --- a/drivers/xen/evtchn.c >> > +++ b/drivers/xen/evtchn.c >> > @@ -471,7 +471,7 @@ static const struct file_operations evtchn_fop= s =3D { >> > >> > =C2=A0static struct miscdevice evtchn_miscdev =3D { >> > =C2=A0 =C2=A0 .minor =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D MISC_DYNAMIC_M= INOR, >> > - =C2=A0 .name =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D "evtchn", >> > + =C2=A0 .name =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D "xen/evtchn", >> >> Um. =C2=A0Will existing userspace - esp. udev rules - continue >> to work after this change? > > The udev rules will just not longer match, as they only rename the > device, this is no problem. However libxc _will_ break, as it lacks > proper error check in its own device creation routine. > > However there are not much possibilities here: this support will go a= way > and it will annoy every user for some time. > >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 Also, how about other xen-related >> devices which are moved to /dev/xen in that same udev rules? > > This is the only device currently supported by the vanilla kernel, > everything else is in the Xen tree only. And naming of primary device nodes is no longer udev's task. All these rules are removed from the default udev rules. These names must all come from the kernel these days. Udev will log errors if udev rules specify names which are not in sync with the kernel, so they can be fixed in the kernel or in the rules. With devtmpfs the kernel needs to know all the names to create them on its own. Udev only manages permissions, possibly creates additional symlinks, runs programs, and distribute the events to userspace. Udev no longer manages the naming of any primary device node. Thanks, Kay