VirtualBox

Changeset 29560 in vbox


Ignore:
Timestamp:
May 17, 2010 3:08:09 PM (15 years ago)
Author:
vboxsync
Message:

RTSystemQueryDmiString: Added RTSYSDMISTR_MANUFACTURER and implemented it on a few systems.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/system.h

    r28800 r29560  
    152152    /** The product serial. */
    153153    RTSYSDMISTR_PRODUCT_SERIAL,
     154    /** The system manufacturer. */
     155    RTSYSDMISTR_MANUFACTURER,
    154156    /** The end of the valid strings. */
    155157    RTSYSDMISTR_END,
  • trunk/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp

    r28800 r29560  
    4949#define PROP_PRODUCT_SERIAL                  "IOPlatformSerialNumber"
    5050#define PROP_PRODUCT_UUID                    "IOPlatformUUID"
     51#define PROP_MANUFACTURER                    "manufacturer"
    5152
    5253
     
    6566        case RTSYSDMISTR_PRODUCT_SERIAL:  PropStringRef = CFSTR(PROP_PRODUCT_SERIAL);  break;
    6667        case RTSYSDMISTR_PRODUCT_UUID:    PropStringRef = CFSTR(PROP_PRODUCT_UUID);    break;
     68        case RTSYSDMISTR_MANUFACTURER:    PropStringRef = CFSTR(PROP_MANUFACTURER);    break;
    6769        default:
    6870            return VERR_NOT_SUPPORTED;
     
    9395    {
    9496        if (   enmString == RTSYSDMISTR_PRODUCT_NAME
    95             || enmString == RTSYSDMISTR_PRODUCT_VERSION)
     97            || enmString == RTSYSDMISTR_PRODUCT_VERSION
     98            || enmString == RTSYSDMISTR_MANUFACTURER
     99           )
    96100        {
    97101            CFDataRef DataRef = (CFDataRef)IORegistryEntryCreateCFProperty(ServiceObject, PropStringRef,
  • trunk/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp

    r28800 r29560  
    5353        case RTSYSDMISTR_PRODUCT_UUID:      pszSysFsName = "id/product_uuid"; break;
    5454        case RTSYSDMISTR_PRODUCT_SERIAL:    pszSysFsName = "id/product_serial"; break;
     55        /// @todo case RTSYSDMISTR_MANUFACTURER:      pszSysFsName = "id/sys_vendor"; break;
    5556        default:
    5657            return VERR_NOT_SUPPORTED;
  • trunk/src/VBox/Runtime/r3/solaris/RTSystemQueryDmiString-solaris.cpp

    r28800 r29560  
    8585                    case RTSYSDMISTR_PRODUCT_VERSION:   rc = RTStrCopy(pszBuf, cbBuf, hSMBInfo.smbi_version); break;
    8686                    case RTSYSDMISTR_PRODUCT_SERIAL:    rc = RTStrCopy(pszBuf, cbBuf, hSMBInfo.smbi_serial);  break;
     87                    case RTSYSDMISTR_MANUFACTURER:      rc = RTStrCopy(pszBuf, cbBuf, hSMBInfo.smbi_manufacturer);  break;
    8788
    8889                    default:  /* make gcc happy */
  • trunk/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp

    r28800 r29560  
    153153        case RTSYSDMISTR_PRODUCT_UUID:      pszPropName = "UUID"; break;
    154154        case RTSYSDMISTR_PRODUCT_SERIAL:    pszPropName = "IdentifyingNumber"; break;
     155        /// @todo case RTSYSDMISTR_MANUFACTURER:      pszPropName = "Vendor"; break;
     156
    155157        default:
    156158            return VERR_NOT_SUPPORTED;
  • trunk/src/VBox/Runtime/testcase/tstRTSystemQueryDmi.cpp

    r28800 r29560  
    6060    RTTestIPrintf(RTTESTLVL_ALWAYS, "PRODUCT_SERIAL: \"%s\", rc=%Rrc\n", szInfo, rc);
    6161
     62    rc = RTSystemQueryDmiString(RTSYSDMISTR_MANUFACTURER, szInfo, sizeof(szInfo));
     63    RTTestIPrintf(RTTESTLVL_ALWAYS, "MANUFACTURER: \"%s\", rc=%Rrc\n", szInfo, rc);
     64
    6265    /*
    6366     * Check that unsupported stuff is terminated correctly.
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