smartmontools SVN Rev 5645
Utility to control and monitor storage systems with "S.M.A.R.T."
|
#include "config.h"
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include <sys/stat.h>
#include <stdexcept>
#include "svnversion.h"
#include "utility.h"
#include "atacmds.h"
#include "dev_interface.h"
#include "sg_unaligned.h"
#include <chrono>
Go to the source code of this file.
Macros | |
#define | __STDC_FORMAT_MACROS 1 |
#define | USE_CLOCK_MONOTONIC 0 |
#define | BUILD_INFO "(local build)" |
#define | N2S_(s) #s |
#define | N2S(s) N2S_(s) |
Functions | |
std::string | format_version_info (const char *prog_name, int lines) |
void | FixGlibcTimeZoneBug () |
const char * | packetdevicetype (int type) |
struct tm * | time_to_tm_local (struct tm *tp, time_t t) |
void | dateandtimezoneepoch (char(&buffer)[DATEANDEPOCHLEN], time_t tval) |
void | syserror (const char *message) |
static const char * | check_regex (const char *pattern) |
int | split_selective_arg (char *s, uint64_t *start, uint64_t *stop, int *mode) |
bool | nonempty (const void *data, int size) |
const char * | format_char_array (char *str, int strsize, const char *chr, int chrsize) |
const char * | format_with_thousands_sep (char *str, int strsize, uint64_t val, const char *thousands_sep) |
const char * | format_capacity (char *str, int strsize, uint64_t val, const char *decimal_point) |
__attribute_format_printf (1, 0) std | |
std::string | strprintf (const char *fmt,...) |
const char * | uint128_hilo_to_str (char *str, int strsize, uint64_t value_hi, uint64_t value_lo) |
long long | get_timer_usec () |
Get microseconds since some unspecified starting point. | |
static void | check_endianness () |
static void | check_snprintf () |
void | check_config () |
Variables | |
const char * | utility_cpp_cvsid |
const char * | packet_types [] |
#define __STDC_FORMAT_MACROS 1 |
Definition at line 18 of file utility.cpp.
#define BUILD_INFO "(local build)" |
Definition at line 82 of file utility.cpp.
#define USE_CLOCK_MONOTONIC 0 |
Definition at line 54 of file utility.cpp.
__attribute_format_printf | ( | 1 | , |
0 | |||
) |
Definition at line 790 of file utility.cpp.
void check_config | ( | ) |
Definition at line 919 of file utility.cpp.
|
static |
Definition at line 880 of file utility.cpp.
|
static |
Definition at line 443 of file utility.cpp.
|
static |
Definition at line 907 of file utility.cpp.
void dateandtimezoneepoch | ( | char(&) | buffer[DATEANDEPOCHLEN], |
time_t | tval | ||
) |
Definition at line 349 of file utility.cpp.
void FixGlibcTimeZoneBug | ( | ) |
Definition at line 214 of file utility.cpp.
const char * format_capacity | ( | char * | str, |
int | strsize, | ||
uint64_t | val, | ||
const char * | decimal_point | ||
) |
Definition at line 748 of file utility.cpp.
const char * format_char_array | ( | char * | str, |
int | strsize, | ||
const char * | chr, | ||
int | chrsize | ||
) |
Definition at line 692 of file utility.cpp.
std::string format_version_info | ( | const char * | prog_name, |
int | lines | ||
) |
Definition at line 87 of file utility.cpp.
const char * format_with_thousands_sep | ( | char * | str, |
int | strsize, | ||
uint64_t | val, | ||
const char * | thousands_sep | ||
) |
Definition at line 716 of file utility.cpp.
long long get_timer_usec | ( | ) |
Get microseconds since some unspecified starting point.
Used only for command duration measurements in debug outputs. Returns -1 if unsupported.
Definition at line 865 of file utility.cpp.
bool nonempty | ( | const void * | data, |
int | size | ||
) |
Definition at line 682 of file utility.cpp.
const char * packetdevicetype | ( | int | type | ) |
Definition at line 315 of file utility.cpp.
int split_selective_arg | ( | char * | s, |
uint64_t * | start, | ||
uint64_t * | stop, | ||
int * | mode | ||
) |
Definition at line 630 of file utility.cpp.
std::string strprintf | ( | const char * | fmt, |
... | |||
) |
Definition at line 799 of file utility.cpp.
void syserror | ( | const char * | message | ) |
Definition at line 409 of file utility.cpp.
struct tm * time_to_tm_local | ( | struct tm * | tp, |
time_t | t | ||
) |
Definition at line 326 of file utility.cpp.
const char * uint128_hilo_to_str | ( | char * | str, |
int | strsize, | ||
uint64_t | value_hi, | ||
uint64_t | value_lo | ||
) |
Definition at line 856 of file utility.cpp.
const char* packet_types[] |
Definition at line 61 of file utility.cpp.
const char* utility_cpp_cvsid |
Definition at line 58 of file utility.cpp.