summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/command.h
blob: 5d8057ab531eb40db1dfee4af1e1e8dd6aadee2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef _GPXE_COMMAND_H
#define _GPXE_COMMAND_H

#include <gpxe/tables.h>

/** A command-line command */
struct command {
	/** Name of the command */
	const char *name;
	/**
	 * Function implementing the command
	 *
	 * @v argc		Argument count
	 * @v argv		Argument list
	 * @ret rc		Return status code
	 */
	int ( * exec ) ( int argc, char **argv );
};

#define __command __table ( struct command, commands, 01 )

#endif /* _GPXE_COMMAND_H */