MCPcopy Create free account
hub / github.com/F-Stack/f-stack / memstat_strerror

Function memstat_strerror

tools/libmemstat/memstat.c:48–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46#include "memstat_internal.h"
47
48const char *
49memstat_strerror(int error)
50{
51
52 switch (error) {
53 case MEMSTAT_ERROR_NOMEMORY:
54 return ("Cannot allocate memory");
55 case MEMSTAT_ERROR_VERSION:
56 return ("Version mismatch");
57 case MEMSTAT_ERROR_PERMISSION:
58 return ("Permission denied");
59 case MEMSTAT_ERROR_DATAERROR:
60 return ("Data format error");
61 case MEMSTAT_ERROR_KVM:
62 return ("KVM error");
63 case MEMSTAT_ERROR_KVM_NOSYMBOL:
64 return ("KVM unable to find symbol");
65 case MEMSTAT_ERROR_KVM_SHORTREAD:
66 return ("KVM short read");
67 case MEMSTAT_ERROR_UNDEFINED:
68 default:
69 return ("Unknown error");
70 }
71}
72
73struct memory_type_list *
74memstat_mtl_alloc(void)

Callers 1

mbprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected