VirtualBox

Changeset 46326 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
May 30, 2013 12:16:53 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86097
Message:

RT_STR_TUPLE

Location:
trunk/src/VBox/Main/src-server
Files:
2 edited

Legend:

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

    r45367 r46326  
    22782278                                char *pszSlice = solarisGetSliceFromPath(pszDevLinkPath);
    22792279                                if (   pszSlice && !strcmp(pszSlice, "s2")
    2280                                     && !strncmp(pszDevLinkPath, "/dev/rdsk", sizeof("/dev/rdsk") - 1))   /* We want only raw disks */
     2280                                    && !strncmp(pszDevLinkPath, RT_STR_TUPLE("/dev/rdsk")))   /* We want only raw disks */
    22812281                                {
    22822282                                    /*
     
    27302730                // skip devices we are not interested in
    27312731                if ((*mountName && mountName[0] == '/') &&                      // skip 'fake' devices (like -hosts, proc, fd, swap)
    2732                     (*mountFSType && (strncmp(mountFSType, "devfs", 5) != 0 &&  // skip devfs (i.e. /devices)
    2733                                       strncmp(mountFSType, "dev", 3) != 0 &&    // skip dev (i.e. /dev)
    2734                                       strncmp(mountFSType, "lofs", 4) != 0)))   // skip loop-back file-system (lofs)
     2732                    (*mountFSType && (strncmp(mountFSType, RT_STR_TUPLE("devfs")) != 0 &&  // skip devfs (i.e. /devices)
     2733                                      strncmp(mountFSType, RT_STR_TUPLE("dev")) != 0 &&    // skip dev (i.e. /dev)
     2734                                      strncmp(mountFSType, RT_STR_TUPLE("lofs")) != 0)))   // skip loop-back file-system (lofs)
    27352735                {
    27362736                    char *rawDevName = getfullrawname((char *)mountName);
  • trunk/src/VBox/Main/src-server/linux/USBGetDevices.cpp

    r45367 r46326  
    358358    pszValue = RTStrStripL(pszValue);
    359359    /* verified with Linux 2.4.0 ... Linux 2.6.25 */
    360     if (!strncmp(pszValue, "1.5", 3))
     360    if (!strncmp(pszValue, RT_STR_TUPLE("1.5")))
    361361        *pSpd = USBDEVICESPEED_LOW;
    362     else if (!strncmp(pszValue, "12 ", 3))
     362    else if (!strncmp(pszValue, RT_STR_TUPLE("12 ")))
    363363        *pSpd = USBDEVICESPEED_FULL;
    364     else if (!strncmp(pszValue, "480", 3))
     364    else if (!strncmp(pszValue, RT_STR_TUPLE("480")))
    365365        *pSpd = USBDEVICESPEED_HIGH;
    366366    else
     
    11231123    {
    11241124        /* No -/. so it must be a root hub. Check that it's usb<something>. */
    1125         if (strncmp(pszLastComp, "usb", sizeof("usb") - 1) != 0)
     1125        if (strncmp(pszLastComp, RT_STR_TUPLE("usb")) != 0)
    11261126        {
    11271127            Log(("usbGetPortFromSysfsPath(%s): failed [2]\n", pszPath));
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