added feature to start shredding for all drives
This commit is contained in:
@ -22,12 +22,13 @@ public:
|
||||
FROZEN
|
||||
} state;
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
time_t u32ShredTimeDelta;
|
||||
std::chrono::time_point<std::chrono::system_clock> chronoShredTimestamp;
|
||||
unsigned long ulWrittenBytes;
|
||||
} sShredSpeed;
|
||||
|
||||
|
||||
bool bWasShredded = false;
|
||||
bool bWasDeleteted = false;
|
||||
bool bIsOffline = false;
|
||||
|
@ -64,6 +64,8 @@ using namespace std;
|
||||
#include "tui.h"
|
||||
#include "logger/logger.h"
|
||||
|
||||
#include "chunk.h"
|
||||
|
||||
extern Logger* logging;
|
||||
|
||||
template <typename T, typename I> T* iterator_to_pointer(I i)
|
||||
@ -83,12 +85,13 @@ private:
|
||||
|
||||
static void searchDrives(list <Drive>* plistDrives);
|
||||
static void printDrives(list <Drive>* plistDrives);
|
||||
static void filterIgnoredDrives(list <Drive>* plistDrives);
|
||||
static void startShredAllDrives(list <Drive>* plistDrives);
|
||||
static void filterIgnoredDrives(list <Drive>* plistDrives);
|
||||
static void filterNewDrives(list <Drive>* plistOldDrives, list <Drive>* plistNewDrives);
|
||||
static void addSMARTData(list <Drive>* plistDrives);
|
||||
static void ThreadScannDevices();
|
||||
static void ThreadUserInput();
|
||||
static void ThreadShred();
|
||||
static void ThreadShred(Drive* const pDrive);
|
||||
static void ThreadDelete();
|
||||
static void ThreadCheckFrozenDrives();
|
||||
static void handleArrowKey(TUI::UserInput userInput);
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
//#define DEMO_DRIVE_SIZE 1024*1024*256L // 256MB
|
||||
//#define DEMO_DRIVE_SIZE 1024*1024*1024L // 1GB
|
||||
//#define DEMO_DRIVE_SIZE 1024*1024*1024*10L // 10GB
|
||||
#define DEMO_DRIVE_SIZE 1024*1024*1024*10L // 10GB
|
||||
|
||||
typedef int fileDescriptor;
|
||||
|
||||
|
@ -22,7 +22,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
enum UserInput { UpKey, DownKey, Abort, Shred, Delete, Enter, ESC, Undefined};
|
||||
enum UserInput { UpKey, DownKey, Abort, Shred, ShredAll, Delete, Enter, ESC, Undefined};
|
||||
struct MenuState
|
||||
{
|
||||
bool bAbort;
|
||||
|
Reference in New Issue
Block a user