Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CSystem.cpp File Reference
#include "CSystem.hpp"
#include "core/CStringTools.hpp"
#include "core/system.hpp"
#include "core/utils.hpp"
#include <cstdarg>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <memory>
#include <syslog.h>
#include <thread>
Include dependency graph for CSystem.cpp:

Functions

static void native_cpuid (uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
 Processor info adn feature bits.
 
static bool prvCheckDiskIsUsb (const std::string &diskName)
 Private function that checks if a disk is removable.
 
static int32_t prvExecuteCommand (const std::string &command)
 Private function that execute a system's command.
 
static void prvGetCPUInfo (uint32_t *p, uint32_t ax)
 Private function that get the CPU information.
 
static std::string prvGetDeviceSerial (const std::string &device)
 Private function that returns the device's serial.
 

Function Documentation

◆ native_cpuid()

static void native_cpuid ( uint32_t * eax,
uint32_t * ebx,
uint32_t * ecx,
uint32_t * edx )
static

Processor info adn feature bits.

Parameters
eaxThe value of register eax
ebxThe value of register ebx
ecxThe value of register ecx (can be input and output)
edxThe value of register edx

◆ prvCheckDiskIsUsb()

static bool prvCheckDiskIsUsb ( const std::string & diskName)
static

Private function that checks if a disk is removable.

Parameters
diskNameString that contain the name of disk
Returns
Boolean saying if the disk is removable or not

◆ prvExecuteCommand()

static int32_t prvExecuteCommand ( const std::string & command)
static

Private function that execute a system's command.

Parameters
commandString that contain the command to execute
Returns
Return an integer's status of the system

◆ prvGetCPUInfo()

static void prvGetCPUInfo ( uint32_t * p,
uint32_t ax )
static

Private function that get the CPU information.

Parameters
pThe value of register ebx
axFinal result

◆ prvGetDeviceSerial()

static std::string prvGetDeviceSerial ( const std::string & device)
static

Private function that returns the device's serial.

Parameters
deviceThe device whence get the serial
Returns
The device's serial