VirtualBox

Changeset 26618 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Feb 17, 2010 3:59:18 PM (15 years ago)
Author:
vboxsync
Message:

RTSystemQueryDmiString-linux.cpp: the dmi stuff can be in /sys/devices/virtual/dmi as well as /sys/class/dmi it seems, so check both places.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/linux/RTSystemQueryDmiString-linux.cpp

    r26608 r26618  
    5353    switch (enmString)
    5454    {
    55         case RTSYSDMISTR_PRODUCT_NAME:      pszSysFsName = "devices/virtual/dmi/id/product_name"; break;
    56         case RTSYSDMISTR_PRODUCT_VERSION:   pszSysFsName = "devices/virtual/dmi/id/product_version"; break;
    57         case RTSYSDMISTR_PRODUCT_UUID:      pszSysFsName = "devices/virtual/dmi/id/product_uuid"; break;
    58         case RTSYSDMISTR_PRODUCT_SERIAL:    pszSysFsName = "devices/virtual/dmi/id/product_serial"; break;
     55        case RTSYSDMISTR_PRODUCT_NAME:      pszSysFsName = "id/product_name"; break;
     56        case RTSYSDMISTR_PRODUCT_VERSION:   pszSysFsName = "id/product_version"; break;
     57        case RTSYSDMISTR_PRODUCT_UUID:      pszSysFsName = "id/product_uuid"; break;
     58        case RTSYSDMISTR_PRODUCT_SERIAL:    pszSysFsName = "id/product_serial"; break;
    5959        default:
    6060            return VERR_NOT_SUPPORTED;
     
    6262
    6363    int rc;
    64     int fd = RTLinuxSysFsOpen(pszSysFsName);
     64    int fd = RTLinuxSysFsOpen("devices/virtual/dmi/%s", pszSysFsName);
     65    if (fd < 0)
     66        fd = RTLinuxSysFsOpen("class/dmi/%s", pszSysFsName);
    6567    if (fd >= 0)
    6668    {
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