[vbox-dev] Changeset 36350 from SVN breaks USB subset

Michael Thayer michael.thayer at oracle.com
Wed Mar 23 21:58:39 GMT 2011


On Wed, 2011-03-23 at 16:52 -0500, Perry Halbert wrote:
> Sorry that doesn't get it either.
> I read that link a few days ago but remember I had no problems until
> the 
> changes in 36350 today.
I take it it builds correctly for you this time though.  Did you check
whether the device nodes are correctly created under /dev/vboxusb when
you plug in devices?  And you might also check which of the two entries
which I removed from that structure was the important one.  I presume it
was
{ "/dev/bus/usb",  true }

Regards,

Michael

> On 03/23/2011 04:34 PM, Michael Thayer wrote:
> > On Wed, 2011-03-23 at 16:15 -0500, Perry Halbert wrote:
> >> Well going back to the present build does not work.  Node is not
> >> created
> >> and and the error returns.
> >> I added the changes that you show in previous reply and get an
> error
> >> shown below
> > Sorry about that!  Here is the correct patch.
> >
> > By the way, see also [ http://www.virtualbox.org/ticket/8502 ].
> >
> > Regards,
> >
> > Michael
> >
> > Index: src/VBox/Main/src-server/linux/USBGetDevices.cpp
> > ===================================================================
> > --- src/VBox/Main/src-server/linux/USBGetDevices.cpp  (revision
> 70699)
> > +++ src/VBox/Main/src-server/linux/USBGetDevices.cpp  (working copy)
> > @@ -1442,17 +1442,7 @@
> >               if (   fHaveInotify
> >                   &&  !pcBestSysfs
> >                   &&
> RTPathExists(s_aTreeLocations[i].szDevicesRoot))
> > -            {
> > -                PUSBDEVICE pDevices;
> > -
> > -                pDevices =
> getDevicesFromSysfs(s_aTreeLocations[i].szDevicesRoot,
> > -                                               true);
> > -                if (pDevices)
> > -                {
> > -                    pcBestSysfs =&s_aTreeLocations[i];
> > -                    deviceListFree(&pDevices);
> > -                }
> > -            }
> > +                pcBestSysfs =&s_aTreeLocations[i];
> >           }
> >       if (pcBestUsbfs&&  !fPreferSysfs)
> >           return pcBestUsbfs;
> >
> >
> >
> >> Reverting and nodes do show up in /dev/vboxusb
> >>
> >> This works
> >> static const USBDEVTREELOCATION s_aTreeLocations[] =
> >> {
> >>       { "/proc/bus/usb", false },
> >>       { "/dev/bus/usb",  false },
> >>       { "/dev/vboxusb",  true },
> >>       { "/dev/bus/usb",  true },
> >> };
> >>
> >> This does not work
> >> static const USBDEVTREELOCATION s_aTreeLocations[] =
> >> {
> >>       { "/dev/vboxusb",  true },
> >>       { "/proc/bus/usb", false },
> >> };
> >>
> >>
> >> On 03/23/2011 03:30 PM, Michael Thayer wrote:
> >>> On Wed, 2011-03-23 at 15:17 -0500, Perry Halbert wrote:
> >>>> By additions this time I was talking about the additional changes
> >> to
> >>>> the
> >>>> file.
> >>>>
> >>>> Give me a bit and I will see what happens.  Takes about 10
> minutes
> >> to
> >>>> get back to a clean build.
> >>> If that makes a difference you might try with the following patch.
> >>>
> >>> Regards,
> >>>
> >>> Michael
> >>>
> >>> Index: src/VBox/Main/src-server/linux/USBGetDevices.cpp
> >>>
> ===================================================================
> >>> --- src/VBox/Main/src-server/linux/USBGetDevices.cpp  (revision
> >> 70699)
> >>> +++ src/VBox/Main/src-server/linux/USBGetDevices.cpp  (working
> copy)
> >>> @@ -1443,15 +1443,8 @@
> >>>                    &&   !pcBestSysfs
> >>>                    &&
> >> RTPathExists(s_aTreeLocations[i].szDevicesRoot))
> >>>                {
> >>> -                PUSBDEVICE pDevices;
> >>> -
> >>> -                pDevices =
> >> getDevicesFromSysfs(s_aTreeLocations[i].szDevicesRoot,
> >>> -                                               true);
> >>> -                if (pDevices)
> >>> -                {
> >>> -                    pcBestSysfs =&s_aTreeLocations[i];
> >>> -                    deviceListFree(&pDevices);
> >>> -                }
> >>> +                pcBestSysfs =&s_aTreeLocations[i];
> >>> +                deviceListFree(&pDevices);
> >>>                }
> >>>            }
> >>>        if (pcBestUsbfs&&   !fPreferSysfs)
> >>>
> >>>
> >>>> On 03/23/2011 03:14 PM, Michael Thayer wrote:
> >>>>> On Wed, 2011-03-23 at 15:06 -0500, Perry Halbert wrote:
> >>>>>> Yes it had the directory.  I don't know if it actually created
> it
> >>>> but
> >>>>>> when investigating it was there.
> >>>>>>
> >>>>>> I can rebuild with the additions if you want for me to look for
> >>>>>> anything
> >>>>>> specific.
> >>>>> The Additions shouldn't play any part here.  I will give you
> >> another
> >>>>> test though - try stopping all VirtualBox processes, plugging in
> a
> >>>> USB
> >>>>> device (a node should be created in /dev/vboxusb for it) and
> >>>> restarting
> >>>>> VirtualBox.
> >>>>>
> >>>>> Regards,
> >>>>>
> >>>>> Michael
> >>>>>
> >>>>>> On 03/23/2011 02:58 PM, Michael Thayer wrote:
> >>>>>>> Hello Perry,
> >>>>>>>
> >>>>>>> On Wed, 2011-03-23 at 14:52 -0500, Perry Halbert wrote:
> >>>>>>>> Changeset 36350 breaks the USB subset
> >>>>>>>> trunk/src/VBox/Main/src-server/linux/USBGetDevices.cpp
> >> (modified)
> >>>>>> (1 diff)
> >>>>>>>> Host Ubuntu 10.10 x86_32
> >>>>>>>> Removing the change fixes it.
> >>>>>>> Does the directory /dev/vboxusb exist on your system?  Does
> >>>> creating
> >>>>>> it
> >>>>>>> make a difference if not?
> >>>>>>>
> >>>>>>> Regards,
> >>>>>>>
> >>>>>>> Michael 
-- 
ORACLE Deutschland B.V. & Co. KG   Michael Thayer
Werkstrasse 24                     VirtualBox engineering
71384 Weinstadt, Germany           mailto:michael.thayer at oracle.com

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven





More information about the vbox-dev mailing list