All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m49s
31 lines
630 B
C
31 lines
630 B
C
#include <in_input.h>
|
|
#include <mprintf.h>
|
|
#include <process_self.h>
|
|
#include <status.h>
|
|
#include <string.h>
|
|
#include <system.h>
|
|
|
|
#define COMMAND_MAX 32
|
|
|
|
static void start_part_dos (void) {
|
|
char dev_name[64];
|
|
|
|
in_stream_read_line ("Device name: ", dev_name, sizeof (dev_name));
|
|
}
|
|
|
|
void app_main (void) {
|
|
libprocess_self_init ();
|
|
|
|
char commandbuf[COMMAND_MAX];
|
|
commandbuf[0] = '\0';
|
|
|
|
if (env_get (process_get_pgid (), "C", (void*)commandbuf, sizeof (commandbuf)) != ST_OK) {
|
|
mprintf ("ERROR C=???. No command provided\n");
|
|
return;
|
|
}
|
|
|
|
if (strcmp (commandbuf, "part_dos") == 0) {
|
|
start_part_dos ();
|
|
}
|
|
}
|