FreeNOS
Public Member Functions
StdioCommand Class Reference
bin » sh

Change the standard Input/Output of the shell. More...

#include <StdioCommand.h>

Inheritance diagram for StdioCommand:
ShellCommand

Public Member Functions

 StdioCommand ()
 Constructor function. More...
 
virtual int execute (const Size nparams, const char **params)
 Executes the command. More...
 
- Public Member Functions inherited from ShellCommand
 ShellCommand (const char *name, const Size minParams=0)
 Constructor. More...
 
virtual ~ShellCommand ()
 Destructor. More...
 
const char * getName () const
 Get command name. More...
 
const char * getHelp () const
 Get command help. More...
 
Size getMinimumParams () const
 Get the minimum number of parameters required. More...
 

Additional Inherited Members

- Protected Attributes inherited from ShellCommand
const char * m_name
 Unique name of the command. More...
 
const char * m_help
 Command help text. More...
 
const Size m_minParams
 Minimum number of parameters required. More...
 

Detailed Description

Change the standard Input/Output of the shell.

Definition at line 35 of file StdioCommand.h.

Constructor & Destructor Documentation

◆ StdioCommand()

StdioCommand::StdioCommand ( )

Constructor function.

Definition at line 22 of file StdioCommand.cpp.

References ShellCommand::m_help.

Member Function Documentation

◆ execute()

int StdioCommand::execute ( const Size  nparams,
const char **  params 
)
virtual

Executes the command.

Parameters
nparamsNumber of parameters given.
paramsArray of parameters.
Returns
Error code or zero on success.

Implements ShellCommand.

Definition at line 27 of file StdioCommand.cpp.

References close(), O_RDWR, and open().


The documentation for this class was generated from the following files: