iPXE
command.h
Go to the documentation of this file.
00001 #ifndef _IPXE_COMMAND_H
00002 #define _IPXE_COMMAND_H
00003 
00004 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00005 
00006 #include <ipxe/tables.h>
00007 
00008 /** A command-line command */
00009 struct command {
00010         /** Name of the command */
00011         const char *name;
00012         /**
00013          * Function implementing the command
00014          *
00015          * @v argc              Argument count
00016          * @v argv              Argument list
00017          * @ret rc              Return status code
00018          */
00019         int ( * exec ) ( int argc, char **argv );
00020 };
00021 
00022 #define COMMANDS __table ( struct command, "commands" )
00023 
00024 #define __command __table_entry ( COMMANDS, 01 )
00025 
00026 extern char * concat_args ( char **args );
00027 
00028 #endif /* _IPXE_COMMAND_H */