37 ctl_t* ctl = &ctls[0];
42 if (argc < ctl->argcMin || argc > ctl->
argcMax)
#define MAX_PATH
Maximum length of filepaths.
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.
#define ENOENT
No such file or directory.
#define EINVAL
Invalid argument.
#define EUNKNOWNCTL
Invalid or unknown control request.
#define errno
Error number variable.
#define E2BIG
Argument list too long.
const char ** argsplit_buf(void *buf, uint64_t size, const char *str, uint64_t maxLen, uint64_t *count)
Standardized argument parsing function using a provided buffer.
#define NULL
Pointer error value.
#define ERR
Integer error value.
EFI_PHYSICAL_ADDRESS buffer
_PUBLIC int strcmp(const char *s1, const char *s2)
Structure defining a ctl command.
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.