25#define CTL_STANDARD_WRITE_DEFINE(name, ...) \
26 static ctl_t name##ctls[] = __VA_ARGS__; \
27 static uint64_t name(file_t* file, const void* buffer, uint64_t count, uint64_t* offset) \
30 return ctl_dispatch(name##ctls, file, buffer, count); \
41#define CTL_STANDARD_OPS_DEFINE(name, ...) \
42 CTL_STANDARD_WRITE_DEFINE(name##write, __VA_ARGS__) \
43 static file_ops_t name = (file_ops_t){ \
44 .write = name##write, \
uint64_t ctl_dispatch(ctl_array_t ctls, file_t *file, const void *buffer, uint64_t count)
Dispatch a ctl command.
ctl_t ctl_array_t[]
Type definition for an array of ctl commands.
uint64_t(* ctl_func_t)(file_t *file, uint64_t, const char **)
Type definition for a ctl function.
EFI_PHYSICAL_ADDRESS buffer
Structure defining a ctl command.
uint64_t argcMin
The minimum number of arguments accepted by func.
ctl_func_t func
The function to call for the command.
uint64_t argcMax
The maximum number of arguments accepted by func.
const char * name
The name of the command.