﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
9014	[patch] virtualbox/VBoxCreateUSBNode.sh test: integer expression expected -> fixed as of 7 Jun 2011 (not for version 4.0)	ClemensFischer		"'uname -rms' -> Linux 2.6.38.7-spott-00008-g2232235 i686

virtualbox-4.0.8 on ARCH linux

This is in the logs when removing USB devices (example):

{{{
  daemon.info: Jun 2 19:35:30 udevd[28730]:
  '/usr/share/virtualbox/VBoxCreateUSBNode.sh 189 130 vboxusers'(err)
  '/usr/share/virtualbox/VBoxCreateUSBNode.sh: line 28: test: vboxusers:
  integer expression expected'
}}}

This patch will silence this unnecessary noise:

{{{
--- /usr/share/virtualbox/VBoxCreateUSBNode.sh.0        2011-05-18 13:55:16.000000000 +0200
+++ /usr/share/virtualbox/VBoxCreateUSBNode.sh  2011-06-02 19:51:57.566847667 +0200
@@ -25,9 +25,7 @@
 device=`expr ""$2"" '%' 128 + 1`
 class=""$3""
 group=""$4""
-if test ""$class"" -eq 9; then
-  exit 0
-fi
+case ""-${class}"" in -9) exit 0;; esac
 devdir=""`printf ""/dev/vboxusb/%.3d"" $bus`""
 devpath=""`printf ""/dev/vboxusb/%.3d/%.3d"" $bus $device`""
 if test ""$do_remove"" -eq 0; then
}}}

No need to mess with licensing for this one-liner, file it under
MIT-licensed if you like.

--ClemensFischer
"	defect	closed	USB	VirtualBox 4.0.8	fixed	patch, script, USB		other	Linux
