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 <string.h>
0021 #include <errno.h>
0022 #include <unistd.h>
0023
0024 #include <rtems.h>
0025 #include <rtems/shell.h>
0026 #include "internal.h"
0027
0028 static int rtems_shell_main_rmdir (int argc, char *argv[])
0029 {
0030 char *dir;
0031 int n;
0032
0033 n = 1;
0034 while (n < argc) {
0035 dir = argv[n++];
0036 if (rmdir(dir)) {
0037 fprintf(stderr,"%s: %s: %s\n", argv[0], dir, strerror(errno));
0038 return -1;
0039 }
0040 }
0041 return 0;
0042 }
0043
0044 rtems_shell_cmd_t rtems_shell_RMDIR_Command = {
0045 "rmdir",
0046 "rmdir dir # remove directory",
0047 "files",
0048 rtems_shell_main_rmdir,
0049 NULL,
0050 NULL
0051 };