mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 14:20:05 -05:00
Log all the smartctl output
This commit is contained in:
parent
258ab45eef
commit
db3c417481
4 changed files with 111 additions and 27 deletions
|
|
@ -139,6 +139,15 @@ typedef void fptr(const char* format, ...);
|
|||
*/
|
||||
const char* esc(const char* str);
|
||||
|
||||
/**
|
||||
* Polish a string.
|
||||
*
|
||||
* Not printable chars are replaced by spaces.
|
||||
*
|
||||
* Note that the passed string is modified.
|
||||
*/
|
||||
char* polish(char* s);
|
||||
|
||||
/****************************************************************************/
|
||||
/* path */
|
||||
|
||||
|
|
@ -249,7 +258,12 @@ void malloc_fail(size_t size);
|
|||
* Reads smartctl attributes from a stream.
|
||||
* Returns 0 on success.
|
||||
*/
|
||||
int smartctl_attribute(FILE* f, uint64_t* smart, char* serial);
|
||||
int smartctl_attribute(FILE* f, const char* file, const char* name, uint64_t* smart, char* serial);
|
||||
|
||||
/**
|
||||
* Flush smartctl output from a stream.
|
||||
*/
|
||||
int smartctl_flush(FILE* f, const char* file, const char* name);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue