cmdparse: add function to convert error status to string

This is used to avoid duplication of error printing in chronyd and
chronyc.
This commit is contained in:
Miroslav Lichvar
2014-12-15 17:59:42 +01:00
parent fc73accfe5
commit e57abae138
4 changed files with 81 additions and 100 deletions

View File

@@ -59,6 +59,9 @@ typedef struct {
/* Parse a command to add an NTP server or peer */
extern CPS_Status CPS_ParseNTPSourceAdd(char *line, CPS_NTP_Source *src);
/* Get a string describing error status */
extern void CPS_StatusToString(CPS_Status status, char *dest, int len);
/* Remove extra white-space and comments */
extern void CPS_NormalizeLine(char *line);