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 524B

1234567891011121314151617181920212223242526
  1. #ifndef _GPXE_COMMAND_H
  2. #define _GPXE_COMMAND_H
  3. FILE_LICENCE ( GPL2_OR_LATER );
  4. #include <gpxe/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. #endif /* _GPXE_COMMAND_H */