Merged altconsole into master

This commit is contained in:
GregoryN
2018-12-08 18:53:54 -06:00
parent c8a252d4ed
commit 3bf4b6d245
30 changed files with 533 additions and 515 deletions

View File

@@ -125,7 +125,7 @@ static inline int date_showtime(FAR struct nsh_vtbl_s *vtbl, FAR const char *nam
ret = clock_gettime(CLOCK_REALTIME, &ts);
if (ret < 0)
{
nsh_output(vtbl, g_fmtcmdfailed, name, "clock_gettime", NSH_ERRNO);
nsh_error(vtbl, g_fmtcmdfailed, name, "clock_gettime", NSH_ERRNO);
return ERROR;
}
@@ -133,7 +133,7 @@ static inline int date_showtime(FAR struct nsh_vtbl_s *vtbl, FAR const char *nam
if (gmtime_r((FAR const time_t*)&ts.tv_sec, &tm) == NULL)
{
nsh_output(vtbl, g_fmtcmdfailed, name, "gmtime_r", NSH_ERRNO);
nsh_error(vtbl, g_fmtcmdfailed, name, "gmtime_r", NSH_ERRNO);
return ERROR;
}
@@ -142,7 +142,7 @@ static inline int date_showtime(FAR struct nsh_vtbl_s *vtbl, FAR const char *nam
ret = strftime(timbuf, MAX_TIME_STRING, format, &tm);
if (ret < 0)
{
nsh_output(vtbl, g_fmtcmdfailed, name, "strftime", NSH_ERRNO);
nsh_error(vtbl, g_fmtcmdfailed, name, "strftime", NSH_ERRNO);
return ERROR;
}
@@ -269,14 +269,14 @@ static inline int date_settime(FAR struct nsh_vtbl_s *vtbl, FAR const char *name
ret = clock_settime(CLOCK_REALTIME, &ts);
if (ret < 0)
{
nsh_output(vtbl, g_fmtcmdfailed, name, "clock_settime", NSH_ERRNO);
nsh_error(vtbl, g_fmtcmdfailed, name, "clock_settime", NSH_ERRNO);
return ERROR;
}
return OK;
errout_bad_parm:
nsh_output(vtbl, g_fmtarginvalid, name);
nsh_error(vtbl, g_fmtarginvalid, name);
return ERROR;
}
#endif
@@ -306,7 +306,7 @@ int cmd_time(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
ret = clock_gettime(TIME_CLOCK, &start);
if (ret < 0)
{
nsh_output(vtbl, g_fmtcmdfailed, argv[0], "clock_gettime", NSH_ERRNO);
nsh_error(vtbl, g_fmtcmdfailed, argv[0], "clock_gettime", NSH_ERRNO);
return ERROR;
}
@@ -332,7 +332,7 @@ int cmd_time(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
ret = clock_gettime(TIME_CLOCK, &end);
if (ret < 0)
{
nsh_output(vtbl, g_fmtcmdfailed, argv[0], "clock_gettime", NSH_ERRNO);
nsh_error(vtbl, g_fmtcmdfailed, argv[0], "clock_gettime", NSH_ERRNO);
ret = ERROR;
}
else
@@ -426,7 +426,7 @@ int cmd_date(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
return ret;
errout:
nsh_output(vtbl, errfmt, argv[0]);
nsh_error(vtbl, errfmt, argv[0]);
return ERROR;
}
#endif