Added privilidges
This commit is contained in:
@@ -22,9 +22,10 @@ typedef void (*CommandHandlerFn)(BootInfo *Boot, CHAR16 *Args);
|
||||
*/
|
||||
typedef struct {
|
||||
const CHAR16 *name; /* command keyword (e.g. L"help") */
|
||||
const CHAR16 *description; /* one-line summary for `help` */
|
||||
const CHAR16 *usage; /* detailed text shown by `man` */
|
||||
CommandHandlerFn handler; /* function that executes the cmd */
|
||||
const CHAR16 *description; /* one-line summary for `help` */
|
||||
const CHAR16 *usage; /* detailed text shown by `man` */
|
||||
TaskPrivilege min_priv; /* minimum privilege required */
|
||||
CommandHandlerFn handler; /* function that executes the cmd */
|
||||
} Command;
|
||||
|
||||
/* Parse and dispatch a line of user input.
|
||||
@@ -33,7 +34,7 @@ typedef struct {
|
||||
* - Pointer to a Task representing the spawned command process,
|
||||
* or NULL if the command was not found or ran synchronously.
|
||||
*/
|
||||
Task *execute_command(BootInfo *Boot, CHAR16 *Input);
|
||||
Task *execute_command(BootInfo *Boot, CHAR16 *Input, TaskPrivilege caller_priv);
|
||||
|
||||
/* Print a formatted list of all registered commands. */
|
||||
void show_help(BootInfo *Boot);
|
||||
|
||||
Reference in New Issue
Block a user