|
smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
|
#include <time.h>#include <sys/types.h>#include <regex.h>#include <stdarg.h>#include <stdio.h>#include <string.h>#include <string>

Go to the source code of this file.
Classes | |
| class | raw_buffer |
| class | stdio_file |
| Wrapper class for FILE *. More... | |
| class | regular_expression |
| Wrapper class for regex(3). Supports copy & assignment and is compatible with STL containers. More... | |
Defines | |
| #define | UTILITY_H_CVSID "$Id: utility.h 3719 2012-12-03 21:19:33Z chrfranke $" |
| #define | __attribute_format_printf(x, y) |
| #define | snprintf safe_snprintf |
| #define | vsnprintf safe_vsnprintf |
| #define | DATEANDEPOCHLEN 64 |
| #define | EXIT(status) { throw (int)(status); } |
Functions | |
| std::string | format_version_info (const char *prog_name, bool full=false) |
| std::string | strprintf (const char *fmt,...) __attribute_format_printf(1 |
| std::string std::string | vstrprintf (const char *fmt, va_list ap) |
| bool | str_starts_with (const char *str, const char *prefix) |
| bool | str_starts_with (const std::string &str, const char *prefix) |
| int | safe_snprintf (char *buf, int size, const char *fmt,...) __attribute_format_printf(3 |
| int int | safe_vsnprintf (char *buf, int size, const char *fmt, va_list ap) |
| uint64_t | strtoull (const char *p, char **endp, int base) |
| void | dateandtimezone (char *buffer) |
| void | dateandtimezoneepoch (char *buffer, time_t tval) |
| void | pout (const char *fmt,...) __attribute_format_printf(1 |
| void void | syserror (const char *message) |
| int | split_report_arg (char *s, int *i) |
| int | split_selective_arg (char *s, uint64_t *start, uint64_t *stop, int *mode) |
| bool | isbigendian () |
| void | check_endianness () |
| const char * | packetdevicetype (int type) |
| bool | nonempty (const void *data, int size) |
| void | FixGlibcTimeZoneBug () |
| const char * | format_with_thousands_sep (char *str, int strsize, uint64_t val, const char *thousands_sep=0) |
| const char * | format_capacity (char *str, int strsize, uint64_t val, const char *decimal_point=0) |
| #define UTILITY_H_CVSID "$Id: utility.h 3719 2012-12-03 21:19:33Z chrfranke $" |
| void check_endianness | ( | ) |
Definition at line 268 of file utility.cpp.
| void dateandtimezone | ( | char * | buffer | ) |
Definition at line 337 of file utility.cpp.
| void dateandtimezoneepoch | ( | char * | buffer, |
| time_t | tval | ||
| ) |
Definition at line 289 of file utility.cpp.
| void FixGlibcTimeZoneBug | ( | ) |
Definition at line 167 of file utility.cpp.
| const char* format_capacity | ( | char * | str, |
| int | strsize, | ||
| uint64_t | val, | ||
| const char * | decimal_point = 0 |
||
| ) |
Definition at line 720 of file utility.cpp.
| std::string format_version_info | ( | const char * | prog_name, |
| bool | full = false |
||
| ) |
Definition at line 83 of file utility.cpp.
| const char* format_with_thousands_sep | ( | char * | str, |
| int | strsize, | ||
| uint64_t | val, | ||
| const char * | thousands_sep = 0 |
||
| ) |
Definition at line 688 of file utility.cpp.
| bool nonempty | ( | const void * | data, |
| int | size | ||
| ) |
Definition at line 679 of file utility.cpp.
| const char* packetdevicetype | ( | int | type | ) |
Definition at line 257 of file utility.cpp.
| void pout | ( | const char * | fmt, |
| ... | |||
| ) |
| int safe_snprintf | ( | char * | buf, |
| int | size, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
| int int safe_vsnprintf | ( | char * | buf, |
| int | size, | ||
| const char * | fmt, | ||
| va_list | ap | ||
| ) |
Definition at line 790 of file utility.cpp.
| int split_report_arg | ( | char * | s, |
| int * | i | ||
| ) |
Definition at line 484 of file utility.cpp.
Definition at line 560 of file utility.cpp.
| bool str_starts_with | ( | const char * | str, |
| const char * | prefix | ||
| ) | [inline] |
| bool str_starts_with | ( | const std::string & | str, |
| const char * | prefix | ||
| ) | [inline] |
| std::string strprintf | ( | const char * | fmt, |
| ... | |||
| ) |
| uint64_t strtoull | ( | const char * | p, |
| char ** | endp, | ||
| int | base | ||
| ) |
Definition at line 509 of file utility.cpp.
| void void syserror | ( | const char * | message | ) |
Definition at line 348 of file utility.cpp.
| std::string std::string vstrprintf | ( | const char * | fmt, |
| va_list | ap | ||
| ) |
Definition at line 763 of file utility.cpp.
1.7.4