File indexing completed on 2025-05-11 08:24:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifdef HAVE_CONFIG_H
0016 #include "config.h"
0017 #endif
0018
0019 #include <stdio.h>
0020 #include <rtems/shell.h>
0021
0022 int rtems_shell_cat_file(FILE * out,const char * name) {
0023 FILE * fd;
0024 int c;
0025
0026 if (out) {
0027 fd = fopen(name,"r");
0028 if (!fd) {
0029 return -1;
0030 }
0031 while ((c=fgetc(fd))!=EOF)
0032 fputc(c,out);
0033 fclose(fd);
0034 }
0035 return 0;
0036 }
0037
0038