/* * @author xamidev * @brief Executable loader * @license GPL-3.0-only */ #include #include #include #include #include #include extern void* archive_start_addr; int loader_load_raw() { char input_buf[PEDICEL_INPUT_SIZE] = {0}; do { printf("file> "); keyboard_getline(input_buf, PEDICEL_INPUT_SIZE); } while (strncmp(input_buf, "", 1) == 0); char* data = NULL; int sz = tar_lookup(archive_start_addr, input_buf,&data); if (sz > 0) { process_create_user_raw(data, sz, input_buf); return 0; // TODO: should return something else on error } printf("Couldn't load file '%s'\r\n", input_buf); return 1; }