Embedded Systems Firmware Demystified (With CD-ROM)
| | ||
| | ||
| | ||
The front end of the command-line processor, called docommand() , takes as its arguments the command-line string and a verbosity level. MicroMonitor uses the verbosity levels for debugging scripts. There are three levels of verbosity :
-
zero verbosity
-
print the incoming line as it is fed to docommand()
-
print the line after shell variables and symbols have been converted
All of the command-line processing is handled in the docommand() function prior to passing control to the command-specific function. This processing includes:
-
making a copy of the incoming command-line string
-
expanding shell variables and symbols
-
breaking up the string into its individual white-space delimited tokens
-
preparing for command-line redirection
-
verifying that the first token is a valid command in the command list
-
providing user -level verification
| | ||
| | ||
| | ||