Skip to content

Commit 3d469e7

Browse files
Chr1sNoCalcProgrammer1
authored andcommitted
Adding failure logging to DMI info
1 parent bc3c1b5 commit 3d469e7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

dependencies/dmiinfo.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
\*-------------------------------------------------------------------*/
99

1010
#include "dmiinfo.h"
11+
#include "LogManager.h"
1112

1213
#ifdef WIN32
1314
#include "wmi.h"
@@ -35,6 +36,7 @@ DMIInfo::DMIInfo()
3536

3637
if (hres)
3738
{
39+
LOG_DEBUG("[DMI Info] Unable to read from %s", WMI);
3840
return;
3941
}
4042

@@ -62,7 +64,10 @@ DMIInfo::DMIInfo()
6264
manufacturer = "";
6365

6466
if ((access(SYSFSDMI "/board_vendor", R_OK)!=0) && (access(SYSFSDMI "/board_name", R_OK)!=0))
67+
{
68+
LOG_DEBUG("[DMI Info] Unable to read from %s", SYSFSDMI);
6569
return;
70+
}
6671

6772
std::ifstream mftr(SYSFSDMI "/board_vendor", std::ifstream::in);
6873
getline(mftr, manufacturer);

dependencies/dmiinfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#ifdef WIN32
1616
#include "wmi.h"
17+
18+
#define WMI "WMI"
1719
#else
1820
#include <unistd.h> //Linux specific filesystem operation
1921
#include <fstream>

0 commit comments

Comments
 (0)