VirtualBox

Ignore:
Timestamp:
Sep 2, 2008 5:02:03 PM (16 years ago)
Author:
vboxsync
Message:

Main/vboxnetflt: Accept raw NIC names as well as NIC name + description on Solaris hosts.

File:
1 edited

Legend:

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

    r11993 r11998  
    12251225
    12261226# elif defined(RT_OS_SOLARIS)
    1227                     /* The name is on the form BSD format 'ifX - long name, chop it off at space. */
     1227                    /* The name is on the form format 'ifX - long name, chop it off at space. */
    12281228                    char szTrunk[8];
    12291229                    strncpy(szTrunk, pszHifName, sizeof(szTrunk));
    12301230                    char *pszSpace = (char *)memchr(szTrunk, ' ', sizeof(szTrunk));
    1231                     if (!pszSpace)
    1232                     {
    1233                         hrc = networkAdapter->Detach();                              H();
    1234                         return VMSetError(pVM, VERR_INTERNAL_ERROR, RT_SRC_POS,
    1235                                           N_("Malformed host interface networking name '%ls'"),
    1236                                           HifName.raw());
    1237                     }
    1238                     *pszSpace = '\0';
     1231                   
     1232                    /*
     1233                     * Currently don't bother about malformed names here for the sake of people using
     1234                     * VBoxManage and setting only the NIC name from there. If there is a space we
     1235                     * chop it off and proceed, otherwise just use whatever we've got.
     1236                     */
     1237                    if (pszSpace)
     1238                        *pszSpace = '\0';
    12391239                    const char *pszTrunk = szTrunk;
    12401240# else
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