VirtualBox

Changeset 34456 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 29, 2010 12:20:42 PM (14 years ago)
Author:
vboxsync
Message:

Main/linux/USB and Installer/linux: switch to using our own device tree under /dev

Location:
trunk/src/VBox
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/Makefile.kmk

    r33185 r34456  
    6666linux-bin_SOURCES = \
    6767        VBoxSysInfo.sh \
     68        VBoxCreateUSBNode.sh \
    6869        VBox.sh=>VBox.sh \
    6970        $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py=>vboxshell.py,)
     
    145146        $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \
    146147        VBoxSysInfo.sh \
     148        VBoxCreateUSBNode.sh \
    147149        VBox.sh \
    148150        VBox.png
  • trunk/src/VBox/Installer/linux/install.sh

    r33329 r34456  
    423423        echo "KERNEL=${udev_fix}\"vboxdrv\", NAME=\"vboxdrv\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"$VBOXDRV_MODE\"" \
    424424          > /etc/udev/rules.d/10-vboxdrv.rules
    425         echo "SUBSYSTEM=${udev_fix}\"usb_device\", GROUP=\"$VBOXUSB_GRP\", MODE=\"$VBOXUSB_MODE\"" \
     425        echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"add\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}\"" \
    426426          >> /etc/udev/rules.d/10-vboxdrv.rules
    427         echo "SUBSYSTEM=${udev_fix}\"usb\", ENV{DEVTYPE}==\"usb_device\", GROUP=\"$VBOXUSB_GRP\", MODE=\"$VBOXUSB_MODE\"" \
     427        echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"add\", ENV{DEVTYPE}==\"usb_device\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}\"" \
     428          >> /etc/udev/rules.d/10-vboxdrv.rules
     429        echo "SUBSYSTEM=${udev_fix}\"usb_device\", ACTION=${udev_fix}\"remove\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\"" \
     430          >> /etc/udev/rules.d/10-vboxdrv.rules
     431        echo "SUBSYSTEM=${udev_fix}\"usb\", ACTION=${udev_fix}\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\"" \
    428432          >> /etc/udev/rules.d/10-vboxdrv.rules
    429433    fi
     
    433437    fi
    434438
    435     # Push the permissions to the USB device nodes.  One of these should match.
    436     # Rather nasty to use udevadm trigger for this, but I don't know of any
    437     # better way.
    438     udevadm trigger --subsystem-match=usb > /dev/null 2>&1
    439     udevtrigger --subsystem-match=usb > /dev/null 2>&1
    440     udevtrigger --subsystem-match=usb_device > /dev/null 2>&1
    441     udevplug -Busb > /dev/null 2>&1
     439    # Build our device tree
     440    for i in /sys/bus/usb/devices/*; do
     441        if test -r "$i/dev"; then
     442            dev="`cat "$i/dev" 2> /dev/null`"
     443            major="`expr "$dev" : '\(.*\):' 2> /dev/null`"
     444            minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null`"
     445            class="`cat $i/bDeviceClass 2> /dev/null`"
     446            sh "$INSTALLATION_DIR/VBoxCreateUSBNode.sh" "$major" "$minor" "$class" 2>/dev/null
     447        fi
     448    done
    442449
    443450    # Write the configuration. Do this before we call /etc/init.d/vboxdrv setup!
  • trunk/src/VBox/Main/linux/USBGetDevices.cpp

    r34341 r34456  
    101101    { "/proc/bus/usb", false },
    102102    { "/dev/bus/usb",  false },
     103    { "/dev/vboxusb",  true },
    103104    { "/dev/bus/usb",  true },
    104105};
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette