detect frozen drives and show that the user

This commit is contained in:
2020-09-11 17:18:53 +02:00
parent 5f593682e2
commit 67b8e302be
7 changed files with 103 additions and 15 deletions

View File

@ -8,15 +8,13 @@
#ifndef REHDD_H_
#define REHDD_H_
//#define DRYRUN
#define DRYRUN
// Drive handling Settings
#define WORSE_HOURS 19200 //mark drive if at this limit or beyond
#define WORSE_POWERUP 10000 //mark drive if at this limit or beyond
#define SHRED_ITERATIONS 1
#define READ 0
#define WRITE 1
#define FROZEN_TIMEOUT 5 //After this timeout (minutes) the drive will be marked as frozen
// Logger Settings
#define LOG_PATH "./reHDD.log"
@ -30,6 +28,10 @@
#define LOG_LEVEL_LOW //log only user actions and tasks
#endif
//IPC pipes
#define READ 0
#define WRITE 1
#include <iostream>
#include <string>
#include <fstream>
@ -82,6 +84,7 @@ private:
static void ThreadScannDevices();
static void ThreadUserInput();
static void ThreadShred();
static void ThreadCheckFrozenDrives();
static void handleArrowKey(TUI::UserInput userInput);
static void handleEnter();
static void handleESC();