RTSystemQueryDmiString-solaris.cpp revision e64031e20c39650a7bc902a3e1aba613b9415dee
/* $Id$ */
/** @file
* IPRT - RTSystemQueryDmiString, solaris ring-3.
*/
/*
* Copyright (C) 2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <smbios.h>
#include <errno.h>
{
*pszBuf = '\0';
AssertReturn(enmString > RTSYSDMISTR_INVALID && enmString < RTSYSDMISTR_END, VERR_INVALID_PARAMETER);
int rc = VERR_NOT_SUPPORTED;
int err = 0;
if (pSMB)
{
{
/* Don't need the common bits for the product UUID. */
if (enmString == RTSYSDMISTR_PRODUCT_UUID)
{
char szData[64];
for (unsigned i = 0; i < cchUuid; i++)
{
if (i == 3 || i == 5 || i == 7 || i == 9)
*pszData++ = '-';
}
*pszData = '\0';
return rc;
}
if (hSMBInfoId != SMB_ERR)
{
switch (enmString)
{
default: /* make gcc happy */
}
return rc;
}
}
/* smbios_* error path. */
}
/* Do some error conversion. */
return rc;
}