Skip to content

Commit

Permalink
initial support of freebsd in SystemInfo.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Fneufneu authored and spiff committed May 4, 2011
1 parent 811c74d commit 9ed9daf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion xbmc/utils/SystemInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ CStdString CSysInfo::GetHddSpaceInfo(int& percent, int drive, bool shortText)
return strRet;
}

#if defined(_LINUX) && !defined(__APPLE__)
#if defined(_LINUX) && !defined(__APPLE__) && !defined(__FreeBSD__)
CStdString CSysInfo::GetLinuxDistro()
{
static const char* release_file[] = { "/etc/debian_version",
Expand Down Expand Up @@ -678,6 +678,9 @@ CStdString CSysInfo::GetUserAgent()
result += "Mac OS X; ";
#endif
result += GetUnameVersion();
#elif defined(__FreeBSD__)
result += "FreeBSD; ";
result += GetUnameVersion();
#elif defined(_LINUX)
result += "Linux; ";
result += GetLinuxDistro();
Expand Down
2 changes: 1 addition & 1 deletion xbmc/utils/SystemInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class CSysInfo : public CInfoLoader
bool GetHDDInfo(CStdString& strHDDModel, CStdString& strHDDSerial,CStdString& strHDDFirmware,CStdString& strHDDpw,CStdString& strHDDLockState);
bool GetRefurbInfo(CStdString& rfi_FirstBootTime, CStdString& rfi_PowerCycleCount);

#if defined(_LINUX) && !defined(__APPLE__)
#if defined(_LINUX) && !defined(__APPLE__) && !defined(__FreeBSD__)
CStdString GetLinuxDistro();
#endif
#ifdef _LINUX
Expand Down

0 comments on commit 9ed9daf

Please sign in to comment.