int cmd_cat(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { char *fullpath; int i; int ret = OK; /* Loop for each file name on the command line */ for (i = 1; i < argc && ret == OK; i++) { /* Get the fullpath to the file */ fullpath = nsh_getfullpath(vtbl, argv[i]); if (!fullpath) { ret = ERROR; } else { /* Dump the file to the console */ ret = cat_common(vtbl, argv[0], fullpath); /* Free the allocated full path */ nsh_freefullpath(fullpath); } } return ret; }
int cmd_dmesg(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { return cat_common(vtbl, argv[0], "/dev/syslog"); }
int cmd_dmesg(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { return cat_common(vtbl, argv[0], CONFIG_SYSLOG_DEVPATH); }