RTEMS CPU Kit with SuperCore  4.11.3
Data Structures | Macros | Functions | Variables
main_rm.c File Reference
#include <rtems.h>
#include <rtems/shell.h>
#include <rtems/shellconfig.h>
#include <getopt.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <fts.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "internal.h"
#include <setjmp.h>
Include dependency graph for main_rm.c:

Data Structures

struct  rtems_shell_rm_globals
 

Macros

#define __need_getopt_newlib
 
#define rindex(s, c)   strrchr(s,c)
 
#define dflag   globals->dflag
 
#define eval   globals->eval
 
#define fflag   globals->fflag
 
#define iflag   globals->iflag
 
#define Pflag   globals->Pflag
 
#define vflag   globals->vflag
 
#define Wflag   globals->Wflag
 
#define stdin_ok   globals->stdin_ok
 
#define rflag   globals->rflag
 
#define Iflag   globals->Iflag
 
#define xuid   globals->uid
 
#define exit_jump   &(globals->exit_jmp)
 
#define exit(ec)   rtems_shell_rm_exit(globals, ec)
 
#define check(a1, a2, a3)   check_rm(globals, a1, a2, a3)
 
#define check2(a1)   check2_rm(globals, a1)
 
#define checkdot(a1)   checkdot_rm(globals, a1)
 
#define checkslash(a1)   checkslash_rm(globals, a1)
 
#define rm_file(a1)   rm_file_rm(globals, a1)
 
#define rm_overwrite(a1, a2)   rm_overwrite_rm(globals, a1, a2)
 
#define rm_tree(a1)   rm_tree_rm(globals, a1)
 
#define usage()   usage_rm(globals)
 
#define SKIPPED   1
 
#define S_ISWHT(m)   (0)
 
#define PASS(byte)
 
#define ISSLASH(a)   ((a)[0] == '/' && (a)[1] == '\0')
 
#define ISDOT(a)   ((a)[0] == '.' && (!(a)[1] || ((a)[1] == '.' && !(a)[2])))
 

Functions

int rtems_shell_main_rm (int argc, char *argv[])
 

Variables

rtems_shell_cmd_t rtems_shell_RM_Command
 

Macro Definition Documentation

◆ PASS

#define PASS (   byte)
Value:
{ \
memset(buf, byte, bsize); \
for (len = sbp->st_size; len > 0; len -= wlen) { \
wlen = len < bsize ? len : bsize; \
if (write(fd, buf, wlen) != wlen) \
goto err; \
} \
}
ssize_t write(int fd, const void *buffer, size_t count)
POSIX 1003.1b 6.4.2 - Write to a File.
Definition: write.c:30

Variable Documentation

◆ rtems_shell_RM_Command

rtems_shell_cmd_t rtems_shell_RM_Command
Initial value:
= {
"rm",
"[-f | -i] [-dIPRrvW] file ...",
"files",
rtems_shell_main_rm,
NULL,
NULL
}