Add printflike to all printf like functions

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-07-17 14:05:23 +08:00
committed by Petro Karashchenko
parent 5c84c47cad
commit c252ec1481
31 changed files with 143 additions and 138 deletions

View File

@@ -75,15 +75,11 @@ int nsh_catfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
strlen(CONFIG_NSH_PROC_MOUNTPOINT)) == 0)
{
nsh_error(vtbl,
"nsh: %s: Could not open %s (is procfs mounted?): %d\n",
cmd, filepath, NSH_ERRNO);
"nsh: %s: Could not open %s (is procfs mounted?)\n",
cmd, filepath);
}
else
#endif
{
nsh_error(vtbl, g_fmtcmdfailed, cmd, "open", NSH_ERRNO);
}
nsh_error(vtbl, g_fmtcmdfailed, cmd, "open", NSH_ERRNO);
return ERROR;
}
@@ -322,15 +318,11 @@ int nsh_writefile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
strlen(CONFIG_NSH_PROC_MOUNTPOINT)) == 0)
{
nsh_error(vtbl,
"nsh: %s: Could not open %s (is procfs mounted?): %d\n",
cmd, filepath, NSH_ERRNO);
"nsh: %s: Could not open %s (is procfs mounted?)\n",
cmd, filepath);
}
else
#endif
{
nsh_error(vtbl, g_fmtcmdfailed, cmd, "open", NSH_ERRNO);
}
nsh_error(vtbl, g_fmtcmdfailed, cmd, "open", NSH_ERRNO);
return ERROR;
}
@@ -384,15 +376,11 @@ int nsh_foreach_direntry(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
strlen(CONFIG_NSH_PROC_MOUNTPOINT)) == 0)
{
nsh_error(vtbl,
"nsh: %s: Could not open %s (is procfs mounted?): %d\n",
cmd, dirpath, NSH_ERRNO);
"nsh: %s: Could not open %s (is procfs mounted?)\n",
cmd, dirpath);
}
else
#endif
{
nsh_error(vtbl, g_fmtnosuch, cmd, "directory", dirpath);
}
nsh_error(vtbl, g_fmtcmdfailed, cmd, "opendir", NSH_ERRNO);
return ERROR;
}