Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp	(revision 18107)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp	(revision 18108)
@@ -1,3 +1,3 @@
-/* $Id: VBoxManageDHCPServer.cpp 44622 2009-03-17 13:48:59Z misha $ */
+/* $Id$ */
 /** @file
  * VBoxManage - Implementation of dhcpserver command.
@@ -43,4 +43,5 @@
 #include <iprt/net.h>
 #include <iprt/getopt.h>
+#include <iprt/ctype.h>
 
 #include <VBox/log.h>
@@ -58,26 +59,22 @@
 } OPCODE;
 
-enum enOptionCodes
-{
-    NETNAME = 1000,
-    IFNAME,
-    IP,
-    NETMASK,
-    LOWERIP,
-    UPPERIP,
-    ENABLE,
-    DISABLE
-};
-
-static const RTGETOPTDEF g_aListOptions[]
+static const RTGETOPTDEF g_aDHCPIPOptions[]
     = {
-        { "-netname",           NETNAME, RTGETOPT_REQ_STRING },
-        { "-ifname",            IFNAME,  RTGETOPT_REQ_STRING },
-        { "-ip",                IP,      RTGETOPT_REQ_STRING },
-        { "-netmask",           NETMASK, RTGETOPT_REQ_STRING },
-        { "-lowerip",           LOWERIP, RTGETOPT_REQ_STRING },
-        { "-upperip",           UPPERIP, RTGETOPT_REQ_STRING },
-        { "-enable",            ENABLE,  RTGETOPT_REQ_NOTHING },
-        { "-disable",           DISABLE,  RTGETOPT_REQ_NOTHING }
+        { "--netname",          'n', RTGETOPT_REQ_STRING },
+        { "-netname",           'n', RTGETOPT_REQ_STRING },     // deprecated (if removed check below)
+        { "--ifname",           'i', RTGETOPT_REQ_STRING },
+        { "-ifname",            'i', RTGETOPT_REQ_STRING },     // deprecated
+        { "--ip",               'a', RTGETOPT_REQ_STRING },
+        { "-ip",                'a', RTGETOPT_REQ_STRING },     // deprecated
+        { "--netmask",          'm', RTGETOPT_REQ_STRING },
+        { "-netmask",           'm', RTGETOPT_REQ_STRING },     // deprecated
+        { "--lowerip",          'l', RTGETOPT_REQ_STRING },
+        { "-lowerip",           'l', RTGETOPT_REQ_STRING },     // deprecated
+        { "--upperip",          'u', RTGETOPT_REQ_STRING },
+        { "-upperip",           'u', RTGETOPT_REQ_STRING },     // deprecated
+        { "--enable",           'e', RTGETOPT_REQ_NOTHING },
+        { "-enable",            'e', RTGETOPT_REQ_NOTHING },    // deprecated
+        { "--disable",          'd', RTGETOPT_REQ_NOTHING },
+        { "-disable",           'd', RTGETOPT_REQ_NOTHING }     // deprecated
       };
 
@@ -104,6 +101,6 @@
                  a->argc,
                  a->argv,
-                 g_aListOptions,
-                 enmCode != OP_REMOVE ? RT_ELEMENTS(g_aListOptions): 2, /* we use only -netname and -ifname for remove*/
+                 g_aDHCPIPOptions,
+                 enmCode != OP_REMOVE ? RT_ELEMENTS(g_aDHCPIPOptions): 4, /* we use only --netname and --ifname for remove*/
                  index,
                  0 /* fFlags */);
@@ -112,9 +109,9 @@
         switch (c)
         {
-            case NETNAME:
+            case 'n':   // --netname
                 if(pNetName)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify -netname once.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify --netname once.");
                 else if (pIfName)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can either use a -netname or -ifname for identifying the dhcp server.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can either use a --netname or --ifname for identifying the dhcp server.");
                 else
                 {
@@ -122,9 +119,9 @@
                 }
             break;
-            case IFNAME:
+            case 'i':   // --ifname
                 if(pIfName)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify -ifname once.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify --ifname once.");
                 else if (pNetName)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can either use a -netname or -ipname for identifying the dhcp server.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can either use a --netname or --ipname for identifying the dhcp server.");
                 else
                 {
@@ -132,7 +129,7 @@
                 }
             break;
-            case IP:
+            case 'a':   // -ip
                 if(pIp)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify -ip once.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify --ip once.");
                 else
                 {
@@ -140,7 +137,7 @@
                 }
             break;
-            case NETMASK:
+            case 'm':   // --netmask
                 if(pNetmask)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify -netmask once.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify --netmask once.");
                 else
                 {
@@ -148,7 +145,7 @@
                 }
             break;
-            case LOWERIP:
+            case 'l':   // --lowerip
                 if(pLowerIp)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify -lowerip once.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify --lowerip once.");
                 else
                 {
@@ -156,7 +153,7 @@
                 }
             break;
-            case UPPERIP:
+            case 'u':   // --upperip
                 if(pUpperIp)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify -upperip once.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can only specify --upperip once.");
                 else
                 {
@@ -164,7 +161,7 @@
                 }
             break;
-            case ENABLE:
+            case 'e':   // --enable
                 if(enable >= 0)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can specify either -enable or -disable once.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can specify either --enable or --disable once.");
                 else
                 {
@@ -172,7 +169,7 @@
                 }
             break;
-            case DISABLE:
+            case 'd':   // --disable
                 if(enable >= 0)
-                    return errorSyntax(USAGE_DHCPSERVER, "You can specify either -enable or -disable once.");
+                    return errorSyntax(USAGE_DHCPSERVER, "You can specify either --enable or --disable once.");
                 else
                 {
@@ -181,10 +178,16 @@
             break;
             case VINF_GETOPT_NOT_OPTION:
-            case VERR_GETOPT_UNKNOWN_OPTION:
-                return errorSyntax(USAGE_DHCPSERVER, "Unknown option \"%s\".", ValueUnion.psz);
+                return errorSyntax(USAGE_DHCPSERVER, "unhandled parameter: %s", ValueUnion.psz);
             break;
             default:
                 if (c > 0)
-                    return errorSyntax(USAGE_DHCPSERVER, "missing case: %c\n", c);
+                {
+                    if (RT_C_IS_GRAPH(c))
+                        return errorSyntax(USAGE_DHCPSERVER, "unhandled option: -%c", c);
+                    else
+                        return errorSyntax(USAGE_DHCPSERVER, "unhandled option: %i", c);
+                }
+                else if (c == VERR_GETOPT_UNKNOWN_OPTION)
+                    return errorSyntax(USAGE_DHCPSERVER, "unknown option: %s", ValueUnion.psz);
                 else if (ValueUnion.pDef)
                     return errorSyntax(USAGE_DHCPSERVER, "%s: %Rrs", ValueUnion.pDef->pszLong, c);
@@ -195,5 +198,5 @@
 
     if(! pNetName && !pIfName)
-        return errorSyntax(USAGE_DHCPSERVER, "You need to specify either -netname or -ifname to identify the dhcp server");
+        return errorSyntax(USAGE_DHCPSERVER, "You need to specify either --netname or --ifname to identify the dhcp server");
 
     if(enmCode != OP_REMOVE)
@@ -202,14 +205,14 @@
         {
             if(!pIp)
-                return errorSyntax(USAGE_DHCPSERVER, "You need to specify -ip option");
+                return errorSyntax(USAGE_DHCPSERVER, "You need to specify --ip option");
 
             if(!pNetmask)
-                return errorSyntax(USAGE_DHCPSERVER, "You need to specify -netmask option");
+                return errorSyntax(USAGE_DHCPSERVER, "You need to specify --netmask option");
 
             if(!pLowerIp)
-                return errorSyntax(USAGE_DHCPSERVER, "You need to specify -lowerip option");
+                return errorSyntax(USAGE_DHCPSERVER, "You need to specify --lowerip option");
 
             if(!pUpperIp)
-                return errorSyntax(USAGE_DHCPSERVER, "You need to specify -upperip option");
+                return errorSyntax(USAGE_DHCPSERVER, "You need to specify --upperip option");
         }
     }
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp	(revision 18107)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp	(revision 18108)
@@ -120,21 +120,21 @@
 {
     { "--filename",     'f', RTGETOPT_REQ_STRING },
-    { "-filename",      'f', RTGETOPT_REQ_STRING },
+    { "-filename",      'f', RTGETOPT_REQ_STRING },     // deprecated
     { "--size",         's', RTGETOPT_REQ_UINT64 },
-    { "-size",          's', RTGETOPT_REQ_UINT64 },
+    { "-size",          's', RTGETOPT_REQ_UINT64 },     // deprecated
     { "--format",       'o', RTGETOPT_REQ_STRING },
-    { "-format",        'o', RTGETOPT_REQ_STRING },
+    { "-format",        'o', RTGETOPT_REQ_STRING },     // deprecated
     { "--static",       'F', RTGETOPT_REQ_NOTHING },
-    { "-static",        'F', RTGETOPT_REQ_NOTHING },
+    { "-static",        'F', RTGETOPT_REQ_NOTHING },    // deprecated
     { "--variant",      'm', RTGETOPT_REQ_STRING },
-    { "-variant",       'm', RTGETOPT_REQ_STRING },
+    { "-variant",       'm', RTGETOPT_REQ_STRING },     // deprecated
     { "--type",         't', RTGETOPT_REQ_STRING },
-    { "-type",          't', RTGETOPT_REQ_STRING },
+    { "-type",          't', RTGETOPT_REQ_STRING },     // deprecated
     { "--comment",      'c', RTGETOPT_REQ_STRING },
-    { "-comment",       'c', RTGETOPT_REQ_STRING },
+    { "-comment",       'c', RTGETOPT_REQ_STRING },     // deprecated
     { "--remember",     'r', RTGETOPT_REQ_NOTHING },
-    { "-remember",      'r', RTGETOPT_REQ_NOTHING },
-    { "--register",     'r', RTGETOPT_REQ_NOTHING },
-    { "-register",      'r', RTGETOPT_REQ_NOTHING },
+    { "-remember",      'r', RTGETOPT_REQ_NOTHING },    // deprecated
+    { "--register",     'r', RTGETOPT_REQ_NOTHING },    // deprecated (inofficial)
+    { "-register",      'r', RTGETOPT_REQ_NOTHING },    // deprecated
 };
 
@@ -488,9 +488,11 @@
                 if (c > 0)
                 {
-                    if (RT_C_IS_PRINT(c))
-                        return errorSyntax(USAGE_CLONEHD, "Invalid option -%c", c);
+                    if (RT_C_IS_GRAPH(c))
+                        return errorSyntax(USAGE_CLONEHD, "unhandled option: -%c", c);
                     else
-                        return errorSyntax(USAGE_CLONEHD, "Invalid option case %i", c);
+                        return errorSyntax(USAGE_CLONEHD, "unhandled option: %i", c);
                 }
+                else if (c == VERR_GETOPT_UNKNOWN_OPTION)
+                    return errorSyntax(USAGE_CLONEHD, "unknown option: %s", ValueUnion.psz);
                 else if (ValueUnion.pDef)
                     return errorSyntax(USAGE_CLONEHD, "%s: %Rrs", ValueUnion.pDef->pszLong, c);
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 18107)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 18108)
@@ -77,7 +77,7 @@
         RTPrintf("VBoxManage list [--long|-l] vms|runningvms|ostypes|hostdvds|hostfloppies|\n"
 #if defined(VBOX_WITH_NETFLT)
-                "                            bridgedifs|hostonlyifs|dhcpservers|hostinfo|\n"
+                 "                            bridgedifs|hostonlyifs|dhcpservers|hostinfo|\n"
 #else
-                "                            bridgedifs|hostinfo|dhcpservers|\n"
+                 "                            bridgedifs|hostinfo|dhcpservers|\n"
 #endif
                  "                            hddbackends|hdds|dvds|floppies|\n"
@@ -241,5 +241,5 @@
     if (u64Cmd & USAGE_EXPORTAPPLIANCE)
     {
-        RTPrintf("VBoxManage export           <machines> [--output|-o] <ovf>\n"
+        RTPrintf("VBoxManage export           <machines> --output|-o <ovf>\n"
                  "\n");
     }
@@ -473,5 +473,5 @@
     if (u64Cmd & USAGE_METRICS)
     {
-        RTPrintf("VBoxManage metrics          list [*|host|<vmname> [<metric_list>]] \n"
+        RTPrintf("VBoxManage metrics          list [*|host|<vmname> [<metric_list>]]\n"
                  "                                                 (comma-separated)\n\n"
                  "VBoxManage metrics          setup\n"
@@ -492,8 +492,8 @@
     if (u64Cmd & USAGE_HOSTONLYIFS)
     {
-        RTPrintf("VBoxManage hostonlyif       ipconfig <name> \n"
-                 "                            [-dhcp| \n"
-                 "                            -ip<ipv4> [-netmask<ipv4> (deflt: 255.255.255.0)]| \n"
-                 "                            -ipv6<ipv6> [-netmasklengthv6<length> (deflt: 64)]]\n"
+        RTPrintf("VBoxManage hostonlyif       ipconfig <name>\n"
+                 "                            [--dhcp |\n"
+                 "                            --ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |\n"
+                 "                            --ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]\n"
 # if defined(RT_OS_WINDOWS)
                  "                            create |\n"
@@ -506,16 +506,16 @@
     if (u64Cmd & USAGE_DHCPSERVER)
     {
-        RTPrintf("VBoxManage dhcpserver       add|modify -netname <network_name> |\n"
+        RTPrintf("VBoxManage dhcpserver       add|modify --netname <network_name> |\n"
 #if defined(VBOX_WITH_NETFLT)
-                 "                                        -ifname <hostonly_if_name>\n"
-#endif
-                 "                                [-ip <ip_address>\n"
-                 "                                 -netmask <network_mask>\n"
-                 "                                 -lowerip <lower_ip>\n"
-                 "                                 -upperip <upper_ip>]\n"
-                 "                                [-enable | -disable]\n"
-                 "VBoxManage dhcpserver       remove -netname <network_name> |\n"
+                 "                                       --ifname <hostonly_if_name>\n"
+#endif
+                 "                                [--ip <ip_address>\n"
+                 "                                 --netmask <network_mask>\n"
+                 "                                 --lowerip <lower_ip>\n"
+                 "                                 --upperip <upper_ip>]\n"
+                 "                                [--enable | --disable]\n"
+                 "VBoxManage dhcpserver       remove --netname <network_name> |\n"
 #if defined(VBOX_WITH_NETFLT)
-                 "                                   -ifname <hostonly_if_name>\n"
+                 "                                   --ifname <hostonly_if_name>\n"
 #endif
                  "\n");
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp	(revision 18107)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp	(revision 18108)
@@ -43,4 +43,5 @@
 #include <iprt/net.h>
 #include <iprt/getopt.h>
+#include <iprt/ctype.h>
 
 #include <VBox/log.h>
@@ -141,20 +142,16 @@
 #endif
 
-enum enOptionCodes
-{
-    DHCP = 1000,
-    IP,
-    NETMASK,
-    IPV6,
-    NETMASKLENGTHV6
-};
-
-static const RTGETOPTDEF g_aListOptions[]
+static const RTGETOPTDEF g_aHostOnlyIPOptions[]
     = {
-        { "-dhcp",              DHCP, RTGETOPT_REQ_NOTHING },
-        { "-ip",                IP, RTGETOPT_REQ_STRING },
-        { "-netmask",           NETMASK, RTGETOPT_REQ_STRING },
-        { "-ipv6",              IPV6, RTGETOPT_REQ_STRING },
-        { "-netmasklengthv6",   NETMASKLENGTHV6, RTGETOPT_REQ_UINT8 }
+        { "--dhcp",             'd', RTGETOPT_REQ_NOTHING },
+        { "-dhcp",              'd', RTGETOPT_REQ_NOTHING },    // deprecated
+        { "--ip",               'a', RTGETOPT_REQ_STRING },
+        { "-ip",                'a', RTGETOPT_REQ_STRING },     // deprecated
+        { "--netmask",          'm', RTGETOPT_REQ_STRING },
+        { "-netmask",           'm', RTGETOPT_REQ_STRING },     // deprecated
+        { "--ipv6",             'b', RTGETOPT_REQ_STRING },
+        { "-ipv6",              'b', RTGETOPT_REQ_STRING },     // deprecated
+        { "--netmasklengthv6",  'l', RTGETOPT_REQ_UINT8 },
+        { "-netmasklengthv6",   'l', RTGETOPT_REQ_UINT8 }       // deprecated
       };
 
@@ -183,6 +180,6 @@
                  a->argc,
                  a->argv,
-                 g_aListOptions,
-                 RT_ELEMENTS(g_aListOptions),
+                 g_aHostOnlyIPOptions,
+                 RT_ELEMENTS(g_aHostOnlyIPOptions),
                  index,
                  0 /* fFlags */);
@@ -191,53 +188,31 @@
         switch (c)
         {
-            case DHCP:   // -dhcp
+            case 'd':   // --dhcp
                 if (bDhcp)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify -dhcp once.");
-                else if(bNetmasklengthv6 || pIpv6 || pIp || pNetmask)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can not use -dhcp with static ip configuration parameters: -ip, -netmask, -ipv6 and -netmasklengthv6.");
+                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify --dhcp once.");
                 else
                     bDhcp = true;
             break;
-            case IP:
+            case 'a':   // --ip
                 if(pIp)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify -ip once.");
-                else if (bDhcp)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can not use -dhcp with static ip configuration parameters: -ip, -netmask, -ipv6 and -netmasklengthv6.");
-                else if(bNetmasklengthv6 || pIpv6)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can not use ipv4 configuration (-ip and -netmask) with ipv6 (-ipv6 and -netmasklengthv6) simultaneously.");
-                else
-                {
+                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify --ip once.");
+                else
                     pIp = ValueUnion.psz;
-                }
-            break;
-            case NETMASK:
+            break;
+            case 'm':   // --netmask
                 if(pNetmask)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify -netmask once.");
-                else if (bDhcp)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can not use -dhcp with static ip configuration parameters: -ip, -netmask, -ipv6 and -netmasklengthv6.");
-                else if(bNetmasklengthv6 || pIpv6)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can not use ipv4 configuration (-ip and -netmask) with ipv6 (-ipv6 and -netmasklengthv6) simultaneously.");
-                else
-                {
+                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify --netmask once.");
+                else
                     pNetmask = ValueUnion.psz;
-                }
-            break;
-            case IPV6:
+            break;
+            case 'b':   // --ipv6
                 if(pIpv6)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify -ipv6 once.");
-                else if (bDhcp)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can not use -dhcp with static ip configuration parameters: -ip, -netmask, -ipv6 and -netmasklengthv6.");
-                else if(pIp || pNetmask)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can not use ipv4 configuration (-ip and -netmask) with ipv6 (-ipv6 and -netmasklengthv6) simultaneously.");
+                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify --ipv6 once.");
                 else
                     pIpv6 = ValueUnion.psz;
             break;
-            case NETMASKLENGTHV6:
+            case 'l':   // --netmasklengthv6
                 if(bNetmasklengthv6)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify -netmasklengthv6 once.");
-                else if (bDhcp)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can not use -dhcp with static ip configuration parameters: -ip, -netmask, -ipv6 and -netmasklengthv6.");
-                else if(pIp || pNetmask)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "You can not use ipv4 configuration (-ip and -netmask) with ipv6 (-ipv6 and -netmasklengthv6) simultaneously.");
+                    return errorSyntax(USAGE_HOSTONLYIFS, "You can only specify --netmasklengthv6 once.");
                 else
                 {
@@ -247,10 +222,16 @@
             break;
             case VINF_GETOPT_NOT_OPTION:
-            case VERR_GETOPT_UNKNOWN_OPTION:
-                return errorSyntax(USAGE_HOSTONLYIFS, "Unknown option \"%s\".", ValueUnion.psz);
+                return errorSyntax(USAGE_HOSTONLYIFS, "unhandled parameter: %s", ValueUnion.psz);
             break;
             default:
                 if (c > 0)
-                    return errorSyntax(USAGE_HOSTONLYIFS, "missing case: %c\n", c);
+                {
+                    if (RT_C_IS_GRAPH(c))
+                        return errorSyntax(USAGE_HOSTONLYIFS, "unhandled option: -%c", c);
+                    else
+                        return errorSyntax(USAGE_HOSTONLYIFS, "unhandled option: %i", c);
+                }
+                else if (c == VERR_GETOPT_UNKNOWN_OPTION)
+                    return errorSyntax(USAGE_HOSTONLYIFS, "unknown option: %s", ValueUnion.psz);
                 else if (ValueUnion.pDef)
                     return errorSyntax(USAGE_HOSTONLYIFS, "%s: %Rrs", ValueUnion.pDef->pszLong, c);
@@ -259,4 +240,10 @@
         }
     }
+
+    /* parameter sanity check */
+    if (bDhcp && (bNetmasklengthv6 || pIpv6 || pIp || pNetmask))
+        return errorSyntax(USAGE_HOSTONLYIFS, "You can not use --dhcp with static ip configuration parameters: --ip, --netmask, --ipv6 and --netmasklengthv6.");
+    if((pIp || pNetmask) && (bNetmasklengthv6 || pIpv6))
+        return errorSyntax(USAGE_HOSTONLYIFS, "You can not use ipv4 configuration (--ip and --netmask) with ipv6 (--ipv6 and --netmasklengthv6) simultaneously.");
 
     ComPtr<IHost> host;
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp	(revision 18107)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp	(revision 18108)
@@ -42,4 +42,5 @@
 #include <iprt/stream.h>
 #include <iprt/getopt.h>
+#include <iprt/ctype.h>
 
 #include <VBox/log.h>
@@ -535,11 +536,7 @@
         RTGETOPTUNION ValueUnion;
         RTGETOPTSTATE GetState;
-        RTGetOptInit(&GetState,
-                     a->argc,
-                     a->argv,
-                     g_aExportOptions,
-                     RT_ELEMENTS(g_aExportOptions),
-                     0, // start at 0 even though arg 1 was "list" because main() has hacked both the argc and argv given to us
-                     0 /* fFlags */);
+        // start at 0 because main() has hacked both the argc and argv given to us
+        RTGetOptInit(&GetState, a->argc, a->argv, g_aExportOptions,
+                     RT_ELEMENTS(g_aExportOptions), 0, 0 /* fFlags */);
         while ((c = RTGetOpt(&GetState, &ValueUnion)))
         {
@@ -573,9 +570,16 @@
                 default:
                     if (c > 0)
-                        return errorSyntax(USAGE_LIST, "missing case: %c\n", c);
+                    {
+                        if (RT_C_IS_GRAPH(c))
+                            return errorSyntax(USAGE_EXPORTAPPLIANCE, "unhandled option: -%c", c);
+                        else
+                            return errorSyntax(USAGE_EXPORTAPPLIANCE, "unhandled option: %i", c);
+                    }
+                    else if (c == VERR_GETOPT_UNKNOWN_OPTION)
+                        return errorSyntax(USAGE_EXPORTAPPLIANCE, "unknown option: %s", ValueUnion.psz);
                     else if (ValueUnion.pDef)
-                        return errorSyntax(USAGE_LIST, "%s: %Rrs", ValueUnion.pDef->pszLong, c);
+                        return errorSyntax(USAGE_EXPORTAPPLIANCE, "%s: %Rrs", ValueUnion.pDef->pszLong, c);
                     else
-                        return errorSyntax(USAGE_LIST, "%Rrs", c);
+                        return errorSyntax(USAGE_EXPORTAPPLIANCE, "%Rrs", c);
             }
 
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp	(revision 18107)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp	(revision 18108)
@@ -39,4 +39,5 @@
 #include <iprt/time.h>
 #include <iprt/getopt.h>
+#include <iprt/ctype.h>
 
 #include "VBoxManage.h"
@@ -162,5 +163,12 @@
             default:
                 if (c > 0)
-                    return errorSyntax(USAGE_LIST, "missing case: %c\n", c);
+                {
+                    if (RT_C_IS_GRAPH(c))
+                        return errorSyntax(USAGE_LIST, "unhandled option: -%c", c);
+                    else
+                        return errorSyntax(USAGE_LIST, "unhandled option: %i", c);
+                }
+                else if (c == VERR_GETOPT_UNKNOWN_OPTION)
+                    return errorSyntax(USAGE_LIST, "unknown option: %s", ValueUnion.psz);
                 else if (ValueUnion.pDef)
                     return errorSyntax(USAGE_LIST, "%s: %Rrs", ValueUnion.pDef->pszLong, c);
