-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dietpi_Core.cpp
54 lines (46 loc) · 1.69 KB
/
Dietpi_Core.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "global.h"
Dietpi_Core::Dietpi_Core(void)
{
//-------------------------------------------------------------
ZeroData();
//-------------------------------------------------------------
}
Dietpi_Core::~Dietpi_Core(void)
{
//-------------------------------------------------------------
//-------------------------------------------------------------
}
void Dietpi_Core::Create(void)
{
//-------------------------------------------------------------
//-------------------------------------------------------------
}
void Dietpi_Core::Destroy(void)
{
//-------------------------------------------------------------
//-------------------------------------------------------------
}
void Dietpi_Core::ZeroData(void)
{
//-------------------------------------------------------------
//-------------------------------------------------------------
}
void Dietpi_Core::Update(void)
{
//-------------------------------------------------------------
//Update system file
exec("/DietPi/dietpi/dietpi-obtain_hw_model");
iHw_Model = stoi ( exec("sed -n 1p /DietPi/dietpi/.hw_model") );
iHw_Arch = stoi ( exec("sed -n 6p /DietPi/dietpi/.hw_model") );
iDistro = stoi ( exec("sed -n 3p /DietPi/dietpi/.hw_model") );
sDeviceName = exec("sed -n 2p /DietPi/dietpi/.hw_model");
sDeviceArch = exec("sed -n 7p /DietPi/dietpi/.hw_model");
sDeviceUUID = exec("sed -n 5p /DietPi/dietpi/.hw_model");
printf("iHw_Model %i\n", iHw_Model);
printf("iHw_Arch %i\n", iHw_Arch);
printf("iDistro %i\n", iDistro);
printf("sDeviceName %s\n", sDeviceName.c_str());
printf("sDeviceArch %s\n", sDeviceArch.c_str());
printf("sDeviceUUID %s\n", sDeviceUUID.c_str());
//-------------------------------------------------------------
}