You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

command.h 576B

12345678910111213141516171819202122232425262728
  1. #ifndef _IPXE_COMMAND_H
  2. #define _IPXE_COMMAND_H
  3. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  4. #include <ipxe/tables.h>
  5. /** A command-line command */
  6. struct command {
  7. /** Name of the command */
  8. const char *name;
  9. /**
  10. * Function implementing the command
  11. *
  12. * @v argc Argument count
  13. * @v argv Argument list
  14. * @ret rc Return status code
  15. */
  16. int ( * exec ) ( int argc, char **argv );
  17. };
  18. #define COMMANDS __table ( struct command, "commands" )
  19. #define __command __table_entry ( COMMANDS, 01 )
  20. extern char * concat_args ( char **args );
  21. #endif /* _IPXE_COMMAND_H */