49 PROCESS(shell_format_process,
"format");
52 "format: format the flash-based Coffee file system",
53 &shell_format_process);
60 shell_output_str(&format_command,
"format: this command will erase all files. Do you want to format? [y/n]",
"");
66 (input->data1[0] ==
'y' || input->data1[0] ==
'Y')) {
68 shell_output_str(&format_command,
"format: formatting file system, please wait...",
"");
79 shell_coffee_init(
void)
void shell_output_str(struct shell_command *c, char *text1, const char *text2)
Output strings from a shell command.
#define PROCESS_BEGIN()
Define the beginning of a process.
Header file for CFS Coffee-specific Contiki shell commands
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
#define PROCESS_END()
Define the end of a process.
Structure for shell input data.
void shell_register_command(struct shell_command *c)
Register a command with the shell.
#define PROCESS_WAIT_EVENT_UNTIL(c)
Wait for an event to be posted to the process, with an extra condition.
#define PROCESS(name, strname)
Declare a process.
int shell_event_input
The event number for shell input data.
int cfs_coffee_format(void)
Format the storage area assigned to Coffee.
Header for the Coffee file system.
#define SHELL_COMMAND(name, command, description, process)
Define a shell command.