# | Line 44 | Line 44 | const char *sg_str_error(sg_error code) { | |
---|---|---|
44 | switch (code) { | |
45 | case SG_ERROR_NONE: | |
46 | return "no error"; | |
47 | + | case SG_ERROR_MALLOC: |
48 | + | return "malloc failed"; |
49 | + | case SG_ERROR_KSTAT_OPEN: |
50 | + | return "failed to open kstat"; |
51 | + | case SG_ERROR_OPEN: |
52 | + | return "failed to open file"; |
53 | + | case SG_ERROR_SYSCTLBYNAME: |
54 | + | return "sysctlbyname failed"; |
55 | + | case SG_ERROR_PARSE: |
56 | + | return "failed to parse input"; |
57 | + | default: |
58 | + | return "unknown error"; |
59 | } | |
48 | – | return "unknown error"; |
60 | } | |
61 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |