VirtualBox

Changeset 48333 in vbox


Ignore:
Timestamp:
Sep 6, 2013 3:22:47 AM (11 years ago)
Author:
vboxsync
Message:

HistImpl: clean up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/HostImpl.cpp

    r48332 r48333  
    226226    HostDnsService          *pHostDnsService;
    227227};
    228 
    229 #ifndef RT_OS_WINDOWS
    230 static char g_aszResolvConf[RTPATH_MAX];
    231 
    232 static inline char *getResolvConfPath()
    233 {
    234     if (!g_aszResolvConf[0]) return g_aszResolvConf;
    235 # ifdef RT_OS_OS2
    236     /*
    237      * This was in an old Slirp code:
    238      * IBM's "Technical Document # - 16070238", clearly says \MPTN\ETC\RESOLV2
    239      * no redolv.conf (remark to code in old Slirp code)
    240      */
    241     if (RTEnvExists("ETC"))
    242     {
    243         RTStrmPrintf(g_aszResolvConf, MAX_PATH, "%/RESOLV2", RTEnvGet("ETC"));
    244         int rc = RTFileExists(g_aszResolvConf);
    245         if (RT_SUCCESS(rc))
    246             return g_aszResolvConf;
    247     }
    248 
    249     RT_ZERO(g_aszResolvConf);
    250     RTStrmPrintf(g_aszResolvConf, sizeof(g_aszResolvConf), "%/RESOLV2", _PATH_ETC);
    251 # else
    252     RTStrCopy(g_aszResolvConf, sizeof(g_aszResolvConf), "/etc/resolv.conf");
    253 # endif   
    254     return g_aszResolvConf;
    255 }
    256 #endif
    257228
    258229////////////////////////////////////////////////////////////////////////////////
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