Index: /trunk/src/VBox/Main/src-server/USBIdDatabaseGenerator.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBIdDatabaseGenerator.cpp	(revision 58005)
+++ /trunk/src/VBox/Main/src-server/USBIdDatabaseGenerator.cpp	(revision 58006)
@@ -77,10 +77,9 @@
 #define USBKEY(vendorId, productId) (((vendorId) << 16) | (productId))
 
-// error codes
-#define ERROR_INVALID_ARGUMENTS (1)
-#define ERROR_OPEN_FILE         (2)
-#define ERROR_IN_PARSE_LINE     (3)
-#define ERROR_DUPLICATE_ENTRY   (4)
-#define ERROR_WRONG_FILE_FORMAT (5)
+// error codes (complements RTEXITCODE_XXX).
+#define ERROR_OPEN_FILE         (12)
+#define ERROR_IN_PARSE_LINE     (13)
+#define ERROR_DUPLICATE_ENTRY   (14)
+#define ERROR_WRONG_FILE_FORMAT (15)
 
 struct VendorRecord
@@ -303,4 +302,11 @@
 }
 
+static int usage(ostream &rOut, const char *argv0)
+{
+    rOut << "Usage: " << argv0
+         << " [linux.org usb list file] [custom usb list file] [-o output file]" << endl;
+    return RTEXITCODE_SYNTAX;
+}
+
 int main(int argc, char *argv[])
 {
@@ -311,8 +317,7 @@
     if (argc < 4)
     {
-        cerr << "Format: " << argv[0] <<
-            " [linux.org usb list file] [custom usb list file] [-o output file]" << endl;
-        cerr << "Error: Invalid arguments." << endl;
-        return ERROR_INVALID_ARGUMENTS;
+        usage(cerr, argv[0]);
+        cerr << "Error: Not enough arguments." << endl;
+        return RTEXITCODE_SYNTAX;
     }
     ofstream fout;
@@ -329,21 +334,25 @@
             continue;
         }
+        if (   strcmp(argv[i], "-h") == 0
+            || strcmp(argv[i], "-?") == 0
+            || strcmp(argv[i], "--help") == 0)
+        {
+            usage(cout, argv[0]);
+            return RTEXITCODE_SUCCESS;
+        }
 
         rc = RTStrmOpen(argv[i], "r", &fin);
         if (RT_FAILURE(rc))
         {
-            cerr << "Format: " << argv[0] <<
-                " [linux.org usb list file] [custom usb list file] [-o output file]" << endl;
-            cerr << "Error: Can not open file '" << argv[i] << "'. Error: " << hex << rc << endl;
+            cerr << "Error: Failed to open file '" << argv[i] << "' for reading. rc=" << rc << endl;
             return ERROR_OPEN_FILE;
         }
 
-        int res = ParseUsbIds(fin);
-        if (res != 0)
-        {
-            cerr << "Error in parsing USB devices file '" <<
-                argv[i] << "'" << endl;
+        rc = ParseUsbIds(fin);
+        if (rc != 0)
+        {
+            cerr << "Error: Failed parsing USB devices file '" << argv[i] << "'" << endl;
             RTStrmClose(fin);
-            return res;
+            return rc;
         }
         RTStrmClose(fin);
@@ -357,15 +366,11 @@
     if (ita != g_products.end())
     {
-        cerr << "Warning: Duplicate alias detected. " << *ita << endl;
-        /** @todo r=bird: Why return success (0) when we didn't generate the
-         *        file?!?!? */
-        return 0;
+        cerr << "Error: Duplicate alias detected. " << *ita << endl;
+        return ERROR_DUPLICATE_ENTRY;
     }
 
     if (!outName)
     {
-        cerr << "Format: " << argv[0] <<
-            " [linux.org usb list file] [custom usb list file] [-o output file]" << endl;
-        cerr << "Error: Output file is not defined." << endl;
+        cerr << "Error: Output file is not specified." << endl;
         return ERROR_OPEN_FILE;
     }
@@ -376,7 +381,5 @@
     if (!fout.is_open())
     {
-        cerr << "Format: " << argv[0] <<
-            " [linux.org usb list file] [custom usb list file] [-o output file]" << endl;
-        cerr << "Error: Can not open file to write '" << argv[1] << "'." << endl;
+        cerr << "Error: Can not open file to write '" << outName << "'." << endl;
         return ERROR_OPEN_FILE;
     }
@@ -399,5 +402,5 @@
 
 
-    return 0;
-}
-
+    return RTEXITCODE_SUCCESS;
+}
+
Index: /trunk/src/VBox/Main/src-server/USBIdDatabaseStub.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBIdDatabaseStub.cpp	(revision 58005)
+++ /trunk/src/VBox/Main/src-server/USBIdDatabaseStub.cpp	(revision 58006)
@@ -18,7 +18,7 @@
 #include "USBIdDatabase.h"
 
-Product const   AliasDictionary::productArray[] = {0};
-const size_t    AliasDictionary::cProducts      = 1; /* std::lower_bound cannot deal with empty array */
-Vendor const    AliasDictionary::vendorArray[]  = {0};
-const size_t    AliasDictionary::cVendors       = 1; /* std::lower_bound cannot deal with empty array */
+Product const   AliasDictionary::aProducts[] = {0};
+const size_t    AliasDictionary::cProducts   = 1; /* std::lower_bound cannot deal with empty array */
+Vendor const    AliasDictionary::aVendors[]  = {0};
+const size_t    AliasDictionary::cVendors    = 1; /* std::lower_bound cannot deal with empty array */
 
