VirtualBox

Changeset 264 in vbox for trunk/src


Ignore:
Timestamp:
Jan 24, 2007 1:07:57 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17803
Message:

added better error message for the most common case that /dev/net/tun is not accessible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r235 r264  
    50305030                else
    50315031                {
    5032                     AssertMsgFailed(("Could not attach to host interface! Bad!\n"));
    5033                     return VMSetError(pVM, VERR_HOSTIF_INIT_FAILED, RT_SRC_POS, N_("Failed to initialize Host Interface Networking"));
     5032                    switch (hrc)
     5033                    {
     5034#ifdef __LINUX__
     5035                        case VERR_ACCESS_DENIED:
     5036                            return VMSetError(pVM, VERR_HOSTIF_INIT_FAILED, RT_SRC_POS,  N_(
     5037                                             "Failed to open '/dev/net/tun' for read/write access. Please check the "
     5038                                             "permissions of that node. Either do 'chmod 0666 /dev/net/tun' or "
     5039                                             "change the group of that node and get member of that group. Make "
     5040                                             "sure that these changes are permanently in particular if you are "
     5041                                             "using udev"));
     5042#endif /* __LINUX__ */
     5043                        default:
     5044                            AssertMsgFailed(("Could not attach to host interface! Bad!\n"));
     5045                            return VMSetError(pVM, VERR_HOSTIF_INIT_FAILED, RT_SRC_POS, N_(
     5046                                             "Failed to initialize Host Interface Networking"));
     5047                    }
    50345048                }
    50355049                break;
     
    54795493        {
    54805494            AssertMsgFailed(("Configuration error: Failed to open /dev/net/tun rc=%Vrc\n", rcVBox));
    5481             rc = setError(E_FAIL, "Failed to open /dev/net/tun rc = %Vrc\n", rcVBox);
     5495            switch (rcVBox)
     5496            {
     5497                case VERR_ACCESS_DENIED:
     5498                    /* will be handled by our caller */
     5499                    LogRel(("HERE\n"));
     5500                    rc = rcVBox;
     5501                    break;
     5502                default:
     5503                    rc = setError(E_FAIL, "Failed to open /dev/net/tun rc = %Vrc\n", rcVBox);
     5504                    break;
     5505            }
    54825506        }
    54835507#elif
Note: See TracChangeset for help on using the changeset viewer.

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