00001 #ifndef _GPXE_COMMAND_H 00002 #define _GPXE_COMMAND_H 00003 00004 FILE_LICENCE ( GPL2_OR_LATER ); 00005 00006 #include <gpxe/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 #endif /* _GPXE_COMMAND_H */
1.5.7.1