Fix error handling if shred failes (#96)
fixes #95 Reviewed-on: #96 Co-authored-by: localhorst <localhorst@mosad.xyz> Co-committed-by: localhorst <localhorst@mosad.xyz>
This commit is contained in:
@@ -1,92 +0,0 @@
|
|||||||
# reHDD Code Style - clang-format configuration
|
|
||||||
# Based on analyzed codebase formatting
|
|
||||||
|
|
||||||
BasedOnStyle: LLVM
|
|
||||||
|
|
||||||
# Indentation
|
|
||||||
IndentWidth: 4
|
|
||||||
TabWidth: 4
|
|
||||||
UseTab: Never
|
|
||||||
ContinuationIndentWidth: 4
|
|
||||||
|
|
||||||
# Braces
|
|
||||||
BreakBeforeBraces: Allman
|
|
||||||
# Allman style:
|
|
||||||
# if (condition)
|
|
||||||
# {
|
|
||||||
# statement;
|
|
||||||
# }
|
|
||||||
|
|
||||||
# Spacing
|
|
||||||
SpaceAfterCStyleCast: false
|
|
||||||
SpaceBeforeParens: ControlStatements
|
|
||||||
SpaceInEmptyParentheses: false
|
|
||||||
SpacesInContainerLiterals: false
|
|
||||||
SpacesInCStyleCastParentheses: false
|
|
||||||
SpacesInParentheses: false
|
|
||||||
SpacesInSquareBrackets: false
|
|
||||||
|
|
||||||
# Alignment
|
|
||||||
AlignAfterOpenBracket: Align
|
|
||||||
AlignConsecutiveAssignments: false
|
|
||||||
AlignConsecutiveDeclarations: false
|
|
||||||
AlignEscapedNewlines: Left
|
|
||||||
AlignOperands: true
|
|
||||||
AlignTrailingComments: false
|
|
||||||
|
|
||||||
# Line breaks
|
|
||||||
AllowShortBlocksOnASingleLine: false
|
|
||||||
AllowShortCaseLabelsOnASingleLine: false
|
|
||||||
AllowShortFunctionsOnASingleLine: None
|
|
||||||
AllowShortIfStatementsOnASingleLine: Never
|
|
||||||
AllowShortLoopsOnASingleLine: false
|
|
||||||
AlwaysBreakAfterReturnType: None
|
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
|
||||||
AlwaysBreakTemplateDeclarations: Yes
|
|
||||||
|
|
||||||
# Column limit
|
|
||||||
ColumnLimit: 0
|
|
||||||
# 0 = no limit (observed in the code)
|
|
||||||
|
|
||||||
# Breaking
|
|
||||||
BinPackArguments: true
|
|
||||||
BinPackParameters: true
|
|
||||||
BreakBeforeBinaryOperators: None
|
|
||||||
BreakBeforeTernaryOperators: true
|
|
||||||
BreakConstructorInitializers: BeforeColon
|
|
||||||
BreakInheritanceList: BeforeColon
|
|
||||||
BreakStringLiterals: false
|
|
||||||
|
|
||||||
# Pointers and references
|
|
||||||
PointerAlignment: Left
|
|
||||||
# Type *variable (not Type* variable)
|
|
||||||
|
|
||||||
# Include sorting
|
|
||||||
SortIncludes: false
|
|
||||||
# Keep includes in original order
|
|
||||||
|
|
||||||
# Comments
|
|
||||||
ReflowComments: false
|
|
||||||
# Don't reformat comments
|
|
||||||
|
|
||||||
# Access modifiers
|
|
||||||
AccessModifierOffset: -4
|
|
||||||
# public: is outdented
|
|
||||||
|
|
||||||
# Constructor initializers
|
|
||||||
ConstructorInitializerIndentWidth: 6
|
|
||||||
# Observed 6 spaces for initializer lists
|
|
||||||
|
|
||||||
# Other
|
|
||||||
Cpp11BracedListStyle: true
|
|
||||||
FixNamespaceComments: true
|
|
||||||
IncludeBlocks: Preserve
|
|
||||||
IndentCaseLabels: false
|
|
||||||
IndentPPDirectives: None
|
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
||||||
MaxEmptyLinesToKeep: 1
|
|
||||||
NamespaceIndentation: None
|
|
||||||
PenaltyBreakBeforeFirstCallParameter: 100
|
|
||||||
PenaltyBreakComment: 300
|
|
||||||
PenaltyBreakString: 1000
|
|
||||||
PenaltyExcessCharacter: 1000000
|
|
||||||
+9
-9
@@ -49,7 +49,7 @@ public:
|
|||||||
|
|
||||||
static void initTUI();
|
static void initTUI();
|
||||||
|
|
||||||
void updateTUI(std::list<Drive>* plistDrives, uint8_t u8SelectedEntry);
|
void updateTUI(std::list<Drive> *plistDrives, uint8_t u8SelectedEntry);
|
||||||
|
|
||||||
static enum UserInput readUserInput();
|
static enum UserInput readUserInput();
|
||||||
|
|
||||||
@@ -60,12 +60,12 @@ private:
|
|||||||
static std::string sRamUsage;
|
static std::string sRamUsage;
|
||||||
static std::string sLocalTime;
|
static std::string sLocalTime;
|
||||||
|
|
||||||
WINDOW* overview;
|
WINDOW *overview;
|
||||||
WINDOW* systemview;
|
WINDOW *systemview;
|
||||||
WINDOW* detailview;
|
WINDOW *detailview;
|
||||||
WINDOW* menuview;
|
WINDOW *menuview;
|
||||||
WINDOW* dialog;
|
WINDOW *dialog;
|
||||||
WINDOW* smartWarning;
|
WINDOW *smartWarning;
|
||||||
|
|
||||||
static void centerTitle(WINDOW *pwin, const char *title);
|
static void centerTitle(WINDOW *pwin, const char *title);
|
||||||
static WINDOW *createOverViewWindow(int iXSize, int iYSize);
|
static WINDOW *createOverViewWindow(int iXSize, int iYSize);
|
||||||
@@ -79,9 +79,9 @@ private:
|
|||||||
static WINDOW *createSmartWarning(int iXSize, int iYSize, int iXStart, int iYStart, std::string sPath, uint32_t u32PowerOnHours, uint32_t u32PowerCycles, uint32_t u32ErrorCount, uint32_t u32Temperature, uint32_t u32ReallocatedSectors, uint32_t u32PendingSectors, uint32_t u32UncorrectableSectors);
|
static WINDOW *createSmartWarning(int iXSize, int iYSize, int iXStart, int iYStart, std::string sPath, uint32_t u32PowerOnHours, uint32_t u32PowerCycles, uint32_t u32ErrorCount, uint32_t u32Temperature, uint32_t u32ReallocatedSectors, uint32_t u32PendingSectors, uint32_t u32UncorrectableSectors);
|
||||||
static WINDOW *createZeroChecksumWarning(int iXSize, int iYSize, int iXStart, int iYStart, std::string sPath, std::string sModelFamily, std::string sModelName, std::string sSerial, uint32_t u32Checksum);
|
static WINDOW *createZeroChecksumWarning(int iXSize, int iYSize, int iXStart, int iYStart, std::string sPath, std::string sModelFamily, std::string sModelName, std::string sSerial, uint32_t u32Checksum);
|
||||||
|
|
||||||
void displaySelectedDrive(Drive& drive, int stdscrX, int stdscrY);
|
void displaySelectedDrive(Drive &drive, int stdscrX, int stdscrY);
|
||||||
std::string formatTimeDuration(time_t u32Duration);
|
std::string formatTimeDuration(time_t u32Duration);
|
||||||
std::string formatSpeed(time_t u32ShredTimeDelta, unsigned long ulWrittenBytes);
|
std::string formatSpeed(time_t u32ShredTimeDelta, unsigned long ulWrittenBytes);
|
||||||
static void vTruncateText(std::string* psText, uint16_t u16MaxLenght);
|
static void vTruncateText(std::string *psText, uint16_t u16MaxLenght);
|
||||||
};
|
};
|
||||||
#endif // TUI_H_
|
#endif // TUI_H_
|
||||||
|
|||||||
Reference in New Issue
Block a user